Told a puzzle mid-conversation, he gave every possible answer at once
On a street, houses are numbered consecutively starting from 1. On one particular house, the sum of all house numbers before it exactly equals the sum of all house numbers after it, up to the last house on the street. A friend posed this to Srinivasa Ramanujan over dinner, without saying how many houses there were. What's the trick to solving it when that count is unknown?
Reveal the answer
Ramanujan reportedly replied instantly with a continued fraction giving every possible solution at once, not just one, recognising the puzzle as a Pell equation, which has infinitely many answers, the smallest being house 6 on a street of 8 houses (1+2+3+4+5 = 15 = 7+8). His friend and biographer P. C. Mahalanobis recorded being stunned that Ramanujan solved the general case without pausing to think.
— Robert Kanigel (recounting P. C. Mahalanobis's account), The Man Who Knew Infinity — Charles Scribner's Sons, 1991
Go deeper: get the book →