How Hardy & Ramanujan Cracked the Partition Formula

p(n) counts the ways to break n into a sum of whole numbers — pure counting, no geometry. So why does pi decide how fast it grows? This is the step-by-step reasoning behind the Hardy–Ramanujan asymptotic formula for the partition function, p(n) ~ exp(pi*sqrt(2n/3)) / (4n*sqrt(3)) — and the circle method that turns it into an astonishingly accurate series. Covered: Counting partitions: p(4) = 5, and the count exploding to p(200) = 3,972,999,029,388 Euler's generating function: the product of 1/(1 - q^k) is the sum of p(n) q^n Cauchy's contour integral: a "tuner" that pulls one coefficient out of the product The singularities: a wall of roots of unity on the unit circle, with q = 1 dominant The behaviour near q = 1: log F ~ pi^2 / 6t (the Dedekind-eta / modular transformation) The honest caveat: "~" is asymptotic, not equal — the leading term runs ~5% high at n = 100 The saddle point: minimizing pi^2/6t + nt gives the exponent pi*sqrt(2n/3) — where pi appears The circle method: summing every root of unity; for n = 200, ~8 terms give ...388.004, rounding to the exact integer Mnemonic: CIRCLE — Count, Infinite product, Recover by contour, Crowd of singularities, Lift near q=1, Extremize (the saddle). Built with Manim, narrated, with a light original-style score.