Appearance
11.3 — Ramanujan
On 16 January 1913, a clerk in the Madras Port Trust Office earning £20 a year posted a letter to G. H. Hardy at Trinity College, Cambridge. It opened by apologising for the writer's lack of a university education, and continued for nine pages with about 120 mathematical statements, most without proof.
Hardy had received crank letters before and initially set it aside. He looked again that evening with his colleague J. E. Littlewood. Some of the formulas were known. Some were wrong. And some were so strange that, as Hardy later wrote, "they must be true, because if they were not true, no one would have had the imagination to invent them."

1. Before the letter
Born in 1887 in Erode, in what is now Tamil Nadu, into a poor Brahmin family. His father was a clerk in a sari shop.
At around 15 he obtained a copy of G. S. Carr's A Synopsis of Elementary Results in Pure Mathematics — a cramming manual listing about 5,000 theorems with terse proofs or none at all. It was a bad book by any normal standard, and it was the making of him. He worked through it, proving or reproving results himself, and absorbed the habit of stating results as bare formulas without argument. That habit shaped everything he wrote afterwards and caused endless difficulty later.
He was so consumed by mathematics that he failed his other subjects and lost his scholarship twice, in 1904 and again in 1906. He never obtained a degree. He ran away from home, lived in poverty, did mathematics on a slate because paper was expensive, and eventually found a clerk's job in Madras in 1912 through the intervention of people who recognised something in his notebooks.
He kept writing. By 1913 he had filled several notebooks with thousands of results.
2. Cambridge
Hardy arranged for him to come to Trinity in April 1914. It was not simple: Ramanujan was a devout Brahmin whose caste and mother's objections made crossing the ocean a serious problem, resolved only when his mother reported a dream in which the family goddess instructed her to permit it.
The collaboration was extraordinary and difficult. Hardy was an atheist, a rigorist, and one of the most exacting mathematicians alive; his standard for a proof was absolute. Ramanujan produced results by a process he described as being given them by the goddess Namagiri in dreams, and often could not say why they were true.
Hardy's assessment was that trying to force him into a conventional mathematical education might have destroyed what made him remarkable, and that leaving him without any might have wasted him. He settled on teaching proof selectively while letting the flow of results continue.
Ramanujan was elected a Fellow of the Royal Society in 1918, at 31 — one of the youngest ever — and a Fellow of Trinity College, the first Indian to receive that honour.
3. The taxicab
Hardy visited Ramanujan in a nursing home at Putney and, having nothing to say, remarked that he had come in taxi number 1729, which seemed a rather dull number.
"No, Hardy," Ramanujan replied. "It is a very interesting number. It is the smallest number expressible as the sum of two cubes in two different ways."
1729 = 1^3+12^3 = 9^3+10^3
He was ill and had not written anything down. The story is well documented, told by Hardy himself, and it captures what everyone who worked with him described: an intimacy with individual numbers that nobody else had. Littlewood said that every positive integer was one of Ramanujan's personal friends.
Numbers expressible as a sum of two cubes in n different ways are now called taxicab numbers. The next one, 87,539,319, works in three ways.
4. The mathematics
The partition function. A partition of n counts the ways to write it as a sum of positive integers. 4 has five: 4, 3+1, 2+2, 2+1+1, 1+1+1+1. The count grows fast — p(100) = 190{,}569{,}292 — and no simple formula was known.
Hardy and Ramanujan produced an asymptotic formula in 1918 accurate enough that rounding it gives the exact value:
p(n)\sim\frac{1}{4n\sqrt3}e^{\pi\sqrt{2n/3}}
Both \pi and e, in a formula about counting ways to break a number into pieces. The method they invented for it, the circle method, became a standard tool in analytic number theory and is still used.
Ramanujan also found congruences nobody had suspected:
p(5k+4)\equiv0\pmod 5, \qquad p(7k+5)\equiv0\pmod7, \qquad p(11k+6)\equiv0\pmod{11}
Every fifth partition number is divisible by 5, and similarly for 7 and 11. There is no obvious reason such patterns should exist, and explaining them took most of the twentieth century.
Series for \pi. He found many, of which the most striking is:
\frac{1}{\pi} = \frac{2\sqrt2}{9801}\sum_{k=0}^{\infty}\frac{(4k)!(1103+26390k)}{(k!)^4 396^{4k}}
Each term adds about eight correct decimal digits. One term gives \pi to six places; two terms to fourteen.
Nobody knew where it came from. It was proved in 1987 by the Borwein brothers, and refined versions of it were used for the record computations of \pi for decades. Where the constants 1103 and 26390 come from is now understood in terms of modular forms, and it was not understood at all when he wrote it down.
Mock theta functions. In his last letter to Hardy in January 1920, three months before he died, Ramanujan described a new class of functions with seventeen examples and almost no explanation of what they were or why they mattered.
They were not understood for eighty years. Sander Zwegers' 2002 doctoral thesis finally identified them as parts of a broader family called harmonic Maass forms.
And they turned out to matter for physics. Mock modular forms appear in the study of black hole entropy in string theory, and in the moonshine phenomena connecting modular forms to sporadic symmetry groups. A dying man in Madras, with no idea what he was writing about, produced objects that theoretical physicists needed ninety years later. This is the single most remarkable fact in his story.
The notebooks. He left three notebooks and a "lost notebook" rediscovered in 1976 in a Trinity library box. Together they contain roughly 3,900 results.
Bruce Berndt spent over twenty years editing them, producing five volumes. Almost all the results proved correct. A small number were wrong, usually in interesting ways. The ratio of correct to incorrect, for results stated without proof by someone with no formal training, is not matched by anyone else in the history of the subject.
5. Illness and death
English weather, wartime food shortages, and the near-impossibility of maintaining a strict vegetarian diet in Cambridge from 1914 to 1918 wrecked his health. He was hospitalised repeatedly, diagnosed at the time with tuberculosis.
A 1994 reassessment by D. A. B. Young concluded the likely cause was hepatic amoebiasis — a parasitic liver infection he had probably contracted in India before leaving, which was treatable even in 1918 if correctly identified, and which produces symptoms easily mistaken for tuberculosis.
He returned to India in 1919 and died on 26 April 1920, aged 32. He was doing mathematics until days before the end — the mock theta letter was written from his sickbed.
6. What to make of him
On the religious claim. Ramanujan attributed his results to the goddess Namagiri appearing in dreams, and said "an equation for me has no meaning unless it expresses a thought of God". He was entirely sincere. What is not in dispute is that something in his mind was doing an enormous amount of unconscious work with numerical structure, and that he experienced the output as revelation rather than as deduction. Treating that as either literal divine dictation or as an embarrassment to be explained away both miss the point; it is how he described his own experience of an unusually powerful and unusual mind.
On what was lost. Hardy was asked to rate mathematicians out of 100 for pure talent. He gave himself 25, Littlewood 30, Hilbert 80, and Ramanujan 100.
He also said, in the same conversation, that his own greatest contribution to mathematics was the discovery of Ramanujan, and that their collaboration was "the one romantic incident in my life".
On what it says about access. Ramanujan came from a poor family in colonial India, failed out of college twice, worked as a clerk, and had a single bad textbook. He was found because he wrote a letter and because one man in Cambridge read it properly instead of discarding it.
How many were not found is not a rhetorical question. It is the practical argument for education systems that reach everywhere, and for taking unusual applicants seriously.
7. Where his work shows up
Computing \pi. The Chudnovsky algorithm, a descendant of his series, is what every record computation uses. The 2021 computation of 62.8 trillion digits ran it.
String theory and black hole physics. Mock modular forms.
Cryptography and coding theory, through the analytic number theory his methods contributed to.
Statistical mechanics. Partition identities appear in the physics of lattice models.
His birthday, 22 December, is National Mathematics Day in India.
Three people, three kinds of genius. The next chapter is about the problems that defeated all of them, and the one field where mathematics discovered a limit it cannot pass.
Every formula above, built from scratch
None of the results in this chapter are worth memorising, because each one can be rebuilt in under a minute from something simpler. What follows is that rebuilding, one result at a time, so the formula and the reason for it sit on the same page as the explanation that needed them.
Ramanujan's series for \pi
\frac{1}{\pi} = \frac{2\sqrt2}{9801}\sum_{k=0}^{\infty}\frac{(4k)!\,(1103+26390k)}{(k!)^4\,396^{4k}}
Written down by Ramanujan in 1914 with no proof, and not proved until 1987 by the Borwein brothers.
What is remarkable about it. Each term adds about eight correct decimal digits. The very first term alone, k=0, gives
\frac{2\sqrt2\times1103}{9801} = 0.3183098862
against the true \frac1\pi = 0.3183098862 — correct to ten digits from one term. Two terms give 18 digits, three give 26.
Compare with the alternatives. The Leibniz series \frac\pi4 = 1-\frac13+\frac15-\cdots, which fell out of a square wave in 9.P, needs about five billion terms for ten digits. Ramanujan's needs one.
Where the numbers come from. 9801, 1103, 26390 and 396 are not arbitrary. They come from the theory of modular forms and complex multiplication, a subject Ramanujan had reconstructed for himself in Madras from a single second-hand textbook and his own extraordinary intuition. He gave no derivation, and the mathematics needed to justify it did not exist in a form he could have cited.
It is still in use. Variants of this formula, particularly the Chudnovsky brothers' related series, hold every world record for computing \pi — currently over 100 trillion digits.