Stern's Sequence (Cathedrals)

2025

Stern Sequence Plot

Overview

This visual piece is generated from Stern’s diatomic sequence, but its structure evokes something entirely different. Towering cathedral-like formations, arches of silence, and intricate repetition are carved out of arithmetic. The design emerges from stacking integer outputs vertically and letting the density of values build toward peaks, forming an architecture entirely native to mathematics. There is no randomness here. Every value is placed precisely, creating a sacred geometry from recursion.

The sequence begins with a(0) = 0 and a(1) = 1, followed by the rules a(2n) = a(n) and a(2n+1) = a(n) + a(n+1). Each value is computed individually using a recursive method that divides the input down to its simplest components. This avoids constructing entire rows and instead evaluates values directly by index. The pattern this produces is deceptively simple in code yet enormously rich when plotted, capturing the ascending spikes and calm troughs that define the piece’s vertical rhythm.

The function evaluates each index based on whether it is even or odd, breaking it down recursively through integer division until it reaches a base case. This process reflects the binary composition of each number and maps that structural logic onto the plane. The final array of points, when plotted against their indices, builds a jagged but coherent skyline of symbolic architecture. A numeric monument with no bricks or mortar, only integers and rules.

You can find my code repository here.