Why is the number 1,729 hidden in Futurama episodes?
The year 1913 marked the beginning of an extraordinary relationship between an impoverished Indian clerk and a Cambridge don. A century later, their remarkable friendship has left its mark in the strangest of places, namely in Futurama, the animated series from The Simpsons creator Matt Groening.
GH Hardy (1877-1947) and Srinivasa Ramanujan (1887-1920) were the archetypal odd couple. Hardy, whose parents were both teachers, grew up in a middle-class home in Surrey, England. At the age of two he was writing numbers that reached into the millions, so it was no surprise that he eventually read mathematics at Trinity College, Cambridge, where he joined an elite secret society known as the Cambridge Apostles.
Ramanujan was born in the Indian state of Tamil Nadu. At the age of two he survived a bout of smallpox, but his three younger siblings were less fortunate, each one dying in infancy. Although he was enrolled in a local school, Ramanujan's most valuable education was thanks to a library book, A Synopsis of Elementary Results in Pure Mathematics by GS Carr, which contained thousands of theorems. He investigated these theorems one by one, relying on a chalk and slate for calculations, using his roughened elbows as erasers.
Aged 21, he married Janakiammal, who was just 10 years old. Unable to afford college fees and needing to support his wife, Ramanujan got a job as a clerk. Nevertheless, he continued his interest in mathematics in his spare time, developing novel ideas and proving fresh theorems.
Curious about the value of his research, Ramanujan began to write to mathematicians in England in the hope that someone would mentor him, or at least give him feedback. Academics such as MJM Hill, HF Baker and EW Hobson largely ignored Ramanujan's pleas for help, but Hardy was mesmerised by the two packages he received in 1913, which contained a total of 120 theorems.
Hardy's reaction veered between "fraud" and so brilliant that it was "scarcely possible to believe". In the end, he concluded that the theorems "must be true, because, if they were not true, no-one would have the imagination to invent them".
The British professor made arrangements for the young Indian, still only 26, to visit Cambridge. Hardy took great pride in being the man who had rescued such raw talent and would later call it "the one romantic incident in my life".
The resulting partnership gave rise to discoveries in several areas of mathematics and Ramanujan's genius was recognised in 1918 when he was elected as a fellow of the Royal Society.
The young Indian savant would later say that many of his theorems were whispered to him in his sleep by Namagiri, an avatar of the Hindu goddess Lakshmi: "While asleep, I had an unusual experience. There was a red screen formed by flowing blood, as it were. I was observing it. Suddenly a hand began to write on the screen. I became all attention. That hand wrote a number of elliptic integrals. They stuck to my mind. As soon as I woke up, I committed them to writing."
Ramanujan's career was brilliant, but ended prematurely when he began to suffer from tuberculosis. He returned to India in 1919 and died the following year, aged 32.
However, the life of Ramanujan continues to fascinate modern mathematicians, including Dr Ken Keeler, who swapped his job as a researcher to join the writing team behind the science fiction sitcom Futurama.
He is actually one of a number of mathematicians - and there are many of them - who write for The Simpsons and its sister series Futurama. They have retained their love for the subject and they continue to express their passion for numbers by smuggling mathematical references into both series.
For example, in order to pay homage to Ramanujan, Keeler has repeatedly inserted 1,729 into Futurama, because this particular number cropped up in a famous conversation between Hardy and Ramanujan.
According to Hardy, he visited Ramanujan in a nursing home in 1918: "I remember once going to see him when he was lying ill at Putney. I had ridden in taxi cab number 1729 and remarked that the number seemed to me rather a dull one and that I hoped it was not an unfavourable omen. 'No,' he replied. 'It is a very interesting number. It is the smallest number expressible as the sum of two cubes in two different ways.'"
Their exchange can be unpacked and expressed as follows:
1,729 = 1³ + 12³ = 9³ + 10³
It is rare that a number can be split into two cubes, and even rarer that it can be split into two cubes in two different ways, and 1,729 is the smallest number that exhibits this property.
It is in recognition of Ramanujan's comment that Bender, Futurama's cantankerous robot, has the serial number 1729.
The number also appears in an episode titled "The Farnsworth Parabox". The plot involves Fry, one Futurama's lead characters, hopping between multiple universes, and one of them is labelled "Universe 1729".
Moreover, the starship Nimbus has the hull registration number BP-1729.
This has certainly helped keep Ramanujan's memory alive, but it is probably not the sort of immortality that Hardy had in mind when he wrote: "Archimedes will be remembered when Aeschylus is forgotten, because languages die and mathematical ideas do not. Immortality may be a silly word, but probably a mathematician has the best chance of whatever it may mean."
Keeler is proud of his mathematical references in Futurama, and he is philosophical about the many years he spent as a mathematician before becoming a comedy writer: "Everything that happens to us has some effect on us, and I do suppose that the time I spent in grad school made me a better writer. I certainly don't regret it.
"For example, I chose Bender's serial number to be 1,729 and I think that reference alone completely justifies my doctorate. I don't know if my thesis advisor sees it that way though."