Blog

A blog of Python-related topics and code.

Recamán's sequence

The Recamán sequence is a famous sequence invented by the Colombian mathematician, Bernardo Recamán Santos. It is defined by the following algorithm, starting at $a_0 = 0$:

The Möbius function and the Mertens conjecture

This blog post was inspired by Holly Krieger's video for Numberphile.

Searching for pi-mnemonic strings in a text

Piphilology comprises the creation and use of mnemonic techniques to remember a span of digits of the mathematical constant $\pi$. One famous technique, attributed to the physicist James Jeans uses the number of letters in each word of the sentence:

Quadtrees #1: Background

The quadtree data structure is a convenient way to store the location of arbitrarily-distributed points in two-dimensional space. Quadtrees are often used in image processing and collision detection.

Processing UK Ordnance Survey terrain data

The UK's Ordnance Survey mapping agency now makes its 50 m resolution elevation data freely-available through its online OpenData download service. This article uses Python, NumPy and Matplotlib to process and visualize these data without using a specialized GIS library.