Ramanujan's intuition is usually explained with one story: that the goddess Namagiri of Namakkal gave him formulas in dreams. That account comes from his Indian friends Seshu Aiyar and Ramachandra Rao, and G. H. Hardy, who worked with him for five years, rejected it. The record points to something less mysterious and more impressive: a self-taught memory for the behaviour of numbers, built through relentless computation, which let him see results long before he could prove them, and sometimes see wrong ones.
- 16 January 1913: a Madras Port Trust clerk mailed Hardy nine pages of unproved results.
- Namagiri: the dream-goddess account comes from his Indian friends; Hardy disputed it.
- Two wrong formulas in that first letter, one on primes, show the intuition was powerful, not infallible.
- About 700 pages of notebooks record results with almost no proofs, built by constant calculation.
- Kahneman and Klein (2009): intuition is trustworthy only in a regular field with fast feedback.
On the Namagiri story, Hardy went further than doubt: he insisted Ramanujan was no mystic and said Ramanujan had told him all religions seemed more or less equally true. This post retells the story from the primary record: Hardy's own 1936 Harvard lecture on Ramanujan, published in 1940, the dated biography in the MacTutor archive, and Bruce Berndt's account of the notebooks.
Then it asks what the cognitive science of expertise says about the kind of intuition Ramanujan had.
Who was Ramanujan before Hardy?
Srinivasa Ramanujan was born on 22 December 1887 in Erode and grew up in Kumbakonam, where his father was a clerk for a cloth merchant. He entered the Town High School in January 1898.
At about 15 he borrowed G. S. Carr's Synopsis of Elementary Results in Pure Mathematics from the Government College library, a tutor's compilation of about 6,000 results with almost no proofs. Hardy later judged it a decent book with clear gaps: nothing on complex function theory and nothing on elliptic functions, which makes Ramanujan's later mastery of elliptic functions all the stranger.
The education that collapsed
His formal education collapsed because he would do nothing but mathematics. The sequence is short and brutal:
- 1905: lost his scholarship at the Government College in Kumbakonam for neglecting other subjects;
- 1906: failed the First Arts exam at Pachaiyappa's College in Madras;
- 1911: published a paper on Bernoulli numbers in the Journal of the Indian Mathematical Society;
- 1 March 1912: started work as a clerk at the Madras Port Trust.
On 16 January 1913, Ramanujan, then a clerk at the Madras Port Trust, wrote to G. H. Hardy at Trinity College, Cambridge. He had already written to two other Cambridge mathematicians, E. W. Hobson and H. F. Baker; neither replied. Hardy received nine pages of mathematics from an unknown Indian with no degree, and his first suspicion was fraud.
He showed the pages to his colleague J. E. Littlewood and the two worked through the list together. Some formulas Hardy recognised, some he could prove with effort, and a set of continued fractions on the last page he could not touch at all. On 8 February 1913 he wrote back that he was exceedingly interested, and that it was essential to see proofs. Within fourteen months Ramanujan was on a ship to England.
MacTutor History of Mathematics: Srinivasa Aiyangar Ramanujan| Date | Event |
|---|---|
| 22 Dec 1887 | Born in Erode; family moves to Kumbakonam about a year later |
| c. 1903 | Borrows Carr's Synopsis, aged about 15 |
| 1904–05 | Government College, Kumbakonam; scholarship lost |
| 1911 | First paper, on Bernoulli numbers |
| 1 Mar 1912 | Clerk, Madras Port Trust |
| Jan 1913 | Writes to G. H. Hardy; Hardy replies on 8 Feb 1913 |
| 17 Mar 1914 | Sails for England; at Trinity College, Cambridge, from 30 Apr |
| 16 Mar 1916 | BA by research for "Highly composite numbers" |
| 2 May 1918 | Fellow of the Royal Society; Trinity Fellow from 10 Oct 1918 |
| 27 Feb 1919 | Sails home, ill |
| 26 Apr 1920 | Dies in Kumbakonam, aged 32 |

What did Hardy make of the 1913 letter?
Hardy sorted it like a referee and concluded the writer was a mathematician of the highest class. In his 1936 Harvard lecture he walked his audience through his reaction, group by group:
- Formulas he recognised, one going back to Laplace and Jacobi;
- Integrals he could prove himself, with more effort than he expected;
- Series results hinting that Ramanujan had far more general theorems up his sleeve;
- Continued fractions that, in Hardy's words, "defeated me completely".
He had never seen anything like the last group. His reasoning from there is famous: results like these had to be true because nobody could have the imagination to invent them, and the writer had to be honest, because great mathematicians are commoner than frauds of that skill.
The mistakes Hardy also found
The part usually left out is that Hardy also found mistakes. The last two formulas in the letter were wrong, he said, and one of them, on the distribution of primes, showed that even Ramanujan's imagination could lead him seriously astray in the analytic theory of numbers.
That detail is the key to understanding his intuition. It was powerful, not infallible.
Where does the goddess story come from?
It comes from Ramanujan's Indian friends, and Hardy disputed it. The two memoirs printed in Ramanujan's Collected Papers (1927) disagree flatly.
- His friends' account: P. V. Seshu Aiyar and R. Ramachandra Rao wrote that he had a special veneration for the goddess of Namakkal, said she inspired formulas in his dreams, and would write results down on waking and check them quickly.
- Hardy's account: his religion was a matter of observance, not conviction, and Ramanujan had once told him, to Hardy's surprise, that all religions seemed to him more or less equally true.
| Claim | Source | How solid |
|---|---|---|
| Namagiri of Namakkal gave him formulas in dreams | Seshu Aiyar and Ramachandra Rao, reporting what he said | Second-hand report of his own account |
| He wrote results on waking and verified them | Same memoir | Plausible; not independently recorded |
| He was an observant Brahmin who kept caste rules in Cambridge | Hardy, from direct knowledge | Strong |
| He had no definite religious beliefs | Hardy, from conversation | Contested by his Indian friends |
| He had little idea of what a proof was | J. E. Littlewood, quoted by Hardy | Strong for his early work |
| 1729 was a "dull" taxi number he instantly recognised | Hardy, as eyewitness | Strong; he knew the number from earlier work |
A fair hearing for Hardy
Hardy's own position deserves a fair hearing and a fair critique. He wanted, he said, to be a rationalist about Ramanujan and warned his audience against treating him as a mystery of eastern wisdom. That was a reasonable guard against romance.
It was also an English rationalist confidently overruling the people who had known Ramanujan longest, about his inner life. Neither account can be verified now. What can be checked is the mathematics, and the mathematics shows a working method, not a revelation.
Neither account of his inner life can be checked now. The mathematics can, and it shows a working method, not a revelation.

What do Ramanujan's notebooks show about his method?
They show a mind that computed constantly and recorded results tersely, almost always without proof. When he died he left three notebooks, a "lost notebook" of about 100 loose pages from his last year in India, and other manuscripts. Berndt, who spent decades proving their contents, gives the sizes.
See the data as a table
| Organised chapters (pages) | Loose or miscellaneous pages (pages) | |
|---|---|---|
| First notebook | 134 | 80 |
| Second notebook | 252 | 100 |
| Third notebook | 33 | 0 |
| Lost notebook | 0 | 100 |
Source: Bruce C. Berndt, Ramanujan's Notebooks Part I (Springer, 1985), Introduction · First notebook: 16 chapters; second: 21 chapters, a revised and enlarged version of the first. Page counts for unorganised sections are approximate.
The second notebook is a revised, enlarged edition of the first, which matters: he went back over his results and reorganised them.
The long road to publication
- 1923: Hardy, who pushed for publication from the 1920s, spends three to four months of hard work on a single chapter.
- 1929: G. N. Watson and B. M. Wilson agree to edit the notebooks and expect it to take five years.
- 1935: Wilson dies at 38 and the work stalls.
- 1957: an unedited photostat edition appears.
- 1985 onward: Berndt's edited edition, which ran to five volumes.
Computation behind the "revelation"
Two details from the record cut against the pure revelation story. Hardy notes that on hard number-theoretic problems Ramanujan must have been guided a good deal by guesswork and intuition, and that Watson's reconstructions show a mixture of intuition and computation.
And the 1729 story itself, often told as instant magic, reflects work he had already done: the Science Museum's account, quoting the Nobel laureate Venki Ramakrishnan, notes that Ramanujan knew the number from his work on near-misses to Fermat's Last Theorem.
What is intuition in cognitive terms?
Psychology treats expert intuition as fast pattern recognition built from long exposure to a regular environment with feedback. In a 2009 paper, Daniel Kahneman and Gary Klein, from opposing research traditions, agreed on two conditions for trustworthy intuition:
- an environment regular enough to be predictable;
- enough opportunity to learn its regularities, through feedback.
They added that the feeling of certainty is not a reliable signal of accuracy.
Why the model fits Ramanujan
Ramanujan fits that model almost perfectly. Number theory and classical analysis are perfectly regular environments, and he gave himself feedback constantly by calculating. That explains both his strengths and his errors.
His formulas for series, continued fractions and modular equations, where calculation could check every guess, were extraordinarily right. His claims about prime distribution, where numerical evidence misleads for a very long range, included the kind of error Hardy pointed out. Subjective certainty, as Littlewood observed, made him look no further once evidence and intuition agreed.
What brain imaging adds
A 2016 study by Marie Amalric and Stanislas Dehaene scanned professional mathematicians and non-mathematicians of similar academic standing while they judged advanced mathematical statements. In mathematicians only, mathematical statements activated a consistent set of frontal, intraparietal and ventrolateral temporal regions, the same areas that respond to numbers and formulas in everyone, and spared the language areas.
Expert mathematical thought, in other words, seems to grow out of basic number sense rather than out of language. That fits a man who learned mathematics from a list of results and his own calculations, not from lectures.
None of this explains genius away. It describes the conditions under which genius of his kind can show up. The question of where mathematical truth lives, discovered or constructed, is the one Tagore and Einstein argued about in 1930; see the Tagore Einstein conversation. Ramanujan's habit of solitary, sustained work also connects with what research says about silence, solitude and thinking.
Why does Ramanujan's story still matter in India?
Because the system that nearly lost him is recognisable. He failed exams in subjects he did not care about, lost a scholarship, and found work as a clerk; his break came through a letter to a stranger abroad.
Today his birthday, 22 December, is National Mathematics Day, and his formulas still turn up in new physics: in December 2025, IISc researchers Faizan Bhat and Aninda Sinha reported in Physical Review Letters that the structure of his 1914 formulas for 1/π appears in logarithmic conformal field theories used in modern high-energy physics. Ramanujan sits alongside other Indian minds in the timeline of Indian thinkers on the mind.
A joint paper by the leading critic of intuition (heuristics and biases) and a leading defender (naturalistic decision making). They map when professional intuition is skilled and when it is overconfident, and conclude that judging an intuition requires asking how predictable the environment is and whether the person had the chance to learn its regularities. Subjective confidence is not a reliable guide to accuracy. Limit: a conceptual synthesis of prior research, not a new experiment.
Read the paperAn fMRI study comparing professional mathematicians with non-mathematician academics of equal standing as they judged the truth of advanced statements in algebra, analysis, topology and geometry, and of non-mathematical statements. In mathematicians only, mathematical statements activated bilateral frontal, intraparietal and ventrolateral temporal regions that also respond to numbers and formulas in non-experts, while sparing language and general-semantics areas. Limit: a modest sample and a judgement task, which is not the same as discovery.
Read the paper (free)The primary source for Hardy's reaction to the 1913 letter, his account of Ramanujan's religion and the goddess story (quoting Seshu Aiyar and Ramachandra Rao), the 1729 taxi, and Littlewood's remark on proof. Hardy is candid about Ramanujan's errors on primes and argues against mystifying him. Limit: written by his collaborator and champion, two decades after his death, with Hardy's own strong views on religion.
Read the book (free)What's new
- IISc physicists link Ramanujan's 1914 formulas for 1/π to modern conformal field theory Indian Institute of Science, Dec 2025
- Ramanujan's century-old pi formulas and black-hole physics ScienceDaily, Dec 2025
- In Ramanujan's 111-year-old formula, IISc paper finds links with black holes and quantum theory ThePrint, Dec 2025
Questions people ask
Did a goddess really give Ramanujan his formulas?
That is what his friends Seshu Aiyar and Ramachandra Rao reported him saying, about the goddess of Namakkal and dreams. Hardy, who knew him in Cambridge, rejected it and said Ramanujan was no mystic. The notebooks show heavy computation behind the results.
How many results are in Ramanujan's notebooks?
Counts vary with how results are grouped, and I have not found one I could verify. What is certain is the size: the first notebook has 16 chapters over 134 pages plus about 80 more pages, the second 21 chapters over 252 pages plus about 100, the third 33 pages, and the lost notebook about 100 loose pages.
Was Ramanujan ever wrong?
Yes. Hardy pointed out that two formulas in the 1913 letter were wrong, including one on the distribution of primes, and said that in the analytic theory of numbers his imagination led him seriously astray. His record on series, continued fractions and modular equations was far stronger.
What is the 1729 story?
Hardy visited Ramanujan, ill in Putney, in taxi number 1729 and called it dull. Ramanujan replied that it is the smallest number expressible as a sum of two cubes in two different ways: 1³ + 12³ and 9³ + 10³.
Sources
- G. H. Hardy: Ramanujan, twelve lectures on subjects suggested by his life and work, Cambridge University Press (1940)
- MacTutor History of Mathematics: Srinivasa Aiyangar Ramanujan (source for the letters to Hobson, Baker and Hardy, and Hardy's 8 February reply)
- Wikipedia: Srinivasa Ramanujan (date of 16 January 1913 and the nine pages, citing Berndt and Rankin 2000 and Snow 1966)
- Bruce C. Berndt: Ramanujan's Notebooks, Part I, Introduction (Springer) (1985)
- Roger Highfield, Science Museum: Instinct, intuition and mathematics, the divine genius of Srinivasa Ramanujan (2018)
- Amir Aczel, Discover: A century on, this math prodigy's formulas are finally unravelled (2014)
- Kahneman D, Klein G: Conditions for intuitive expertise, American Psychologist (2009)
- Amalric M, Dehaene S: Origins of the brain networks for advanced mathematics in expert mathematicians, PNAS (2016)
- IISc: How Ramanujan's formulae for pi connect to modern high energy physics (2025)
