♾️ Harmonic Series Demo
A two-player, one-screen 3D "math flyer" for the first base camp of Everest — the Riemann Hypothesis. One of you flies Descent-style through a living diagram of the harmonic series $H_N = 1 + \tfrac{1}{2} + \tfrac{1}{3} + \cdots + \tfrac{1}{N}$; the other drags Manipulate-style sliders to bend the world in real time. Watch the terms shrink toward zero while the partial-sum wall grows forever — the astonishing fact that the harmonic series diverges.
Two players, one keyboard + one mouse (or add a joystick + Xbox controller). 🎮
A number series you can fly through
The harmonic series is the sum of the reciprocals of the whole numbers. Each new term — $\tfrac{1}{2}$, $\tfrac{1}{3}$, $\tfrac{1}{4}$, … — is smaller than the last, shrinking toward zero. So surely the total settles down to some finite number? It doesn't. Add enough terms and the sum sails past 10, past 100, past any number you name — just agonizingly slowly (to pass 10 you need 12,367 terms!). This demo makes that paradox physical: a front row of colored bars are the terms $\tfrac{1}{n}$ (they shrink), and a translucent wall behind them is the running total $H_n$ (it never stops climbing), traced by the amber growth law $H_N \approx \ln N + \gamma$.
Eleven scenes, one stubborn series
Press Tab to fly between eleven faithfully-rendered scenes — each a famous consequence of that one divergence, rebuilt in true 3D from the classic Wikipedia figures:
- Definition & Divergence — the shrinking terms vs. the ever-growing wall.
- Comparison Test (Oresme, ~1350) — infinitely many blue rectangles, each of area ½.
- Integral Test — $H_N$ trapped between two integrals of $1/x$.
- Partial Sums & Growth — the table of harmonic numbers and the $\ln n + \gamma$ curve.
- Divisibility — why no harmonic number (except $H_1$) is ever a whole number.
- Interpolation (Digamma) — a domain-colored painting of $\psi(z)$ and Ramanujan's $\gamma$.
- Crossing a Desert — the jeep/fuel-depot problem, reach $= \tfrac{r}{2}H_n$.
- Stacking Blocks — an overhang of $\tfrac{1}{2}H_n$ block-lengths, with no limit.
- Counting Primes & Divisors — Euler 1737, Mertens, and Dirichlet's lattice.
- Collecting Coupons — the expected wait $E[T] = n H_n$, with a live simulation.
- Quicksort — the harmonic price of sorting, $2n(H_n - 1)$ comparisons.
📸 Gallery — real in-demo screenshots
Straight from the demo. Click any photo to view it full-size.
🏔️ Why it lives on Everest
The harmonic series is the doorway to the Riemann zeta function $\zeta(s) = \sum_{n=1}^{\infty} \tfrac{1}{n^s}$ — the harmonic series is exactly $\zeta(1)$, sitting right at the edge where the sum first blows up. Understanding how it diverges — and Euler's stunning discovery that it equals a product over the primes — is the first foothold on the climb toward the Riemann Hypothesis. This demo is the playable first Stepping Stone of Base Camp: Classical & Modern Analytic Number Theory.
❤️ How you two play
🕹️ Player 1 — The Pilot
Flies the camera through the 3D world Descent-style with the keyboard (and an optional joystick) — full 6 degrees of freedom, no gimbal lock.
🎯 Player 2 — The Manipulator
Bends the world with the mouse (and an optional Xbox controller), dragging Manipulate-style sliders: more terms, more opacity, scrub the animations.
🎮 Controls
🕹️ Pilot (keyboard)
W/Sforward / back ·A/Dstrafe ·Z/Xup / downQ/Eroll · arrow keys pitch / yaw · Shift boost- Hold the right mouse button to mouse-look
🖱️ Manipulator (mouse)
- Drag the sliders on the right to change $N$, opacity, curves, and to scrub the animations
🎮 Shared
- Tab — next scene · R — reset view · I — toggle info · H/F1 — help · Esc — quit
⚙️ The tech
Language: pure Python. Graphics: real-time 3D via PyOpenGL + pygame (a quaternion 6-DOF camera, no gimbal lock). Math & labels: NumPy, with crisp LaTeX rendered through matplotlib's mathtext. Free and open-source — every line is on GitHub.
⬇️ Download & play (Windows)
The easy way — no Python, no terminal, no installer:
- Download the Windows
.zipfrom the button above. - Right-click it → Extract All…
- Open the extracted folder.
- Double-click "HarmonicSeriesDemo.exe" — that's it! 🎉
- Grab your partner: one on the keyboard, one on the mouse. Press Tab to explore! 🎮
🛡️ Heads-up: we're a brand-new, free, open-source project, so Windows may say "Unknown publisher." That's expected for small free games — click "More info" → "Run anyway." It installs nothing and never touches your system. Source code.
🧑💻 Prefer to run from source? (for developers)
- Get the code from GitHub (free, open-source — no account, ever).
- Make sure you have Python installed, then install the libraries:
pip install pygame PyOpenGL numpy matplotlib - Run it:
python harmonic_series_mathematics.py(in the Analytic Number Theory base-camp folder).
First time running a game like this? Our How It Works page walks you through everything in plain English.
← Back to Base Camp: Analytic Number Theory