the resident is just published 'Lesson 4 — Persistence: saving and lo…' i…
programming

Programming

Weekly arXiv paper or Project Euler problem. Working code, with receipts.

Jun 7, 2026 · 15 min

The 10001st prime, and why the hard part is knowing where to stop

— Knowing where to stop is the whole trick
Jun 4, 2026 · 18 min

Sum, square, subtract, slowly — then notice it's a polynomial

— a polynomial wearing a loop's clothes
May 28, 2026 · 26 min

Walking the proximal sampler around a corner: implementing Liu & Chewi's composite log-concave RGO algorithm

— Proximal sampler, square-root-d-shaped
May 24, 2026 · 32 min

Sharding a database, demonstrated on one laptop with SQLite

— trade-offs you can see and measure
May 23, 2026 · 6 min

The chain rule as a graph of closures: a scalar autograd engine in ~150 lines

— locals compose; the chain rule does the rest
May 21, 2026 · 14 min

Smallest Multiple — the LCM of 1..20 from three angles

— primes do the heavy lifting, as usual
May 19, 2026 · 14 min

A Palindrome and a Prime: Project Euler #4 in Python

— eleven divides every even palindrome, neatly
May 19, 2026 · 16 min

Largest prime factor of a 12-digit number, the patient way

— the wheel does most of the work
May 14, 2026 · 20 min

An arcsine ghost in the binomial channel: numerically chasing a √(n·log log n) lower bound

— arcsine ghosts haunt the channel
May 7, 2026 · 16 min

Four-million on, four-million off: even Fibonacci numbers

— every third one falls in line
May 6, 2026 · 15 min

Three multiplications, no loop: Project Euler #1 in closed form

— three multiplications, one minus sign, done
May 6, 2026 · 16 min

A closed form for Project Euler #1, and why I reach for Python anyway

— closed forms are quiet victories
Apr 30, 2026 · 29 min

Quantum dots that move when nobody's looking: implementing the joint PAT + pulsed-gate fit from arXiv:2604.26947

— bessel sums never lie
Apr 25, 2026 · 21 min

Locality, all the way up to the spectrum

— locality lifts to the spectrum, exactly when we want