Maths Story #1

Ramanujan and the Taxicab Number

Srinivasa Ramanujan India 1887–1920

  • 8-minute read
  • Puzzle at the end

Start reading

Text size

A clerk from Madras wrote a letter to Cambridge. It changed mathematics for ever.

Cambridge, England. January 1913. One of the most famous mathematicians in the world, G. H. Hardy, is opening his post. Inside one envelope he finds page after page of strange formulas. They come from a clerk in Madras, India, a man Hardy has never heard of, with no university degree. Some of the formulas look ordinary. Some look wrong. And some look almost impossible.

Who sent them? And how could anyone discover such things alone? To find out, we have to go back to a small temple town in South India…

In Kumbakonam, a temple town in Tamil Nadu, there once lived a young man who did his mathematics on a slate. Paper was expensive, so he worked out his ideas in chalk, wiped the slate clean with his elbow, and started again, over and over, until his elbow became rough and dark. Only the final results went into his notebooks. His name was Srinivasa Ramanujan, and one day the whole world of mathematics would learn his name.

A boy and a book

Ramanujan was born on 22 December 1887 in Erode, at his grandmother’s home, and grew up in Kumbakonam. His family did not have much money. His father, K. Srinivasa Iyengar, worked as a clerk in a sari shop, and his mother, Komalatammal, looked after the home.

At the Town High School in Kumbakonam, Ramanujan was a star pupil. Then, as a teenager, he came across a thick book by an English teacher named G. S. Carr, called “A Synopsis of Elementary Results in Pure and Applied Mathematics”. It was not an exciting book to most people. It listed thousands of formulas and results, one after another, with hardly any explanations.

But to Ramanujan it was a treasure chest. He worked through it on his own, checking each result, and then went much further. He began to discover new formulas of his own and wrote them down in notebooks. He worked so fast that he often wrote only the answers, not the steps in between.

To most people, the book was a dull list. To Ramanujan, it was a door into a whole new world.

Too much mathematics?

In 1904, Ramanujan won a scholarship to the Government College in Kumbakonam. But there was a problem: he loved mathematics so much that he ignored his other subjects. He failed them, and he lost his scholarship. He tried again at another college in Madras (now Chennai), but the same thing happened.

For a few years, life was hard. Ramanujan had no degree and no steady job. Still, he never stopped working on mathematics, filling page after page with his discoveries. In 1909 he married Janaki, and he needed to earn a living.

Some people who met him could see that he was special. In 1911, his first research paper was published in the “Journal of the Indian Mathematical Society”. In 1912, with the help of people who admired his work, he got a job as a clerk in the accounts section of the Madras Port Trust. He did his job well, and in every spare moment he did mathematics.

He did not know it yet, but a single letter was about to change his life, and the history of mathematics.

A letter to Cambridge

Ramanujan knew that to grow as a mathematician, he needed experts to look at his work. So, in January 1913, he wrote a letter to G. H. Hardy, one of the most famous mathematicians in England, at Trinity College, Cambridge. With the letter he sent pages and pages of his formulas.

This was the envelope that Hardy opened at the start of our story. It came from a clerk he had never heard of, from a city thousands of kilometres away, with no university degree. Many of the formulas looked strange, and some seemed almost impossible.

At first Hardy was not sure what to make of it. Then he studied the pages carefully with his friend and fellow mathematician, J. E. Littlewood. Some of the results were already known. Some were even wrong. But many were brilliant, and some were unlike anything Hardy had ever seen. Hardy decided that only a great mathematician could have written them. He invited Ramanujan to come to Cambridge.

A long journey

Going to England was a big decision. Ramanujan had never left India, and his family had worries about him crossing the sea. In the end, he agreed to go. On 17 March 1914, he left Madras by ship for England.

Cambridge was a very different world: cold, grey winters, a new language of lectures and gowns, and food he could not easily eat, because Ramanujan was a strict vegetarian who cooked for himself. A few months after he arrived, the First World War began, and fresh vegetables and other food became even harder to find.

But the mathematics was wonderful. Hardy was careful and exact, and he insisted on proofs. Ramanujan had astonishing ideas and an almost magical feel for numbers. Together they made a remarkable team. In 1916, Cambridge awarded Ramanujan a degree for his research.

The partition puzzle

One of their most famous pieces of work was about partitions. A partition of a number is a way of writing it as a sum of whole numbers, where the order does not matter. For example, the number 4 can be written in 5 different ways: 4, 3 + 1, 2 + 2, 2 + 1 + 1 and 1 + 1 + 1 + 1.

For small numbers you can count the ways by hand. But the counts grow very fast. Mathematicians wanted a formula that could predict the number of partitions of any number without counting them all. Hardy and Ramanujan found one. Another mathematician, Major Percy MacMahon, had patiently worked out the number of partitions of every number up to 200. The number 200, it turned out, can be split in 3,972,999,029,388 ways. When Hardy and Ramanujan checked their formula against his list, it gave the right answers. It was a triumph.

Honours and illness

In 1917, Ramanujan became seriously ill and had to stay in nursing homes. Even then, he kept working.

In 1918, he received two great honours. He was elected a Fellow of the Royal Society, one of the most important scientific societies in the world. He was only the second Indian ever to be elected. A few months later, in October 1918, he became a Fellow of Trinity College, Cambridge.

And then, on one ordinary visit to a hospital bed, a taxi gave Ramanujan the chance to show what made him so special…

The taxi number

Hardy often visited his friend when he was ill. Years later, Hardy wrote down what happened on one of those visits, to a nursing home in Putney, London. Hardy had arrived in a taxi, and he mentioned that its number, 1729, seemed rather a dull one.

“No,” Ramanujan replied at once, “it is a very interesting number; it is the smallest number expressible as the sum of two cubes in two different ways.”

He was right. 1729 = 1³ + 12³ = 1 + 1,728. And 1729 = 9³ + 10³ = 729 + 1,000. No smaller number can be made from two cubes in two different ways. Since then, 1729 has been known as the Hardy–Ramanujan number, and numbers like it are called taxicab numbers.

What amazed Hardy was not that Ramanujan knew this fact. It was that numbers were like personal friends to him. He seemed to know their secrets.

Home again

In 1919, still unwell, Ramanujan sailed home to India. He kept doing mathematics in his last months, writing about new kinds of functions that mathematicians are still studying today. On 26 April 1920, he died at the age of only 32.

The lost notebook

The story does not end there. In 1976, an American mathematician named George Andrews was searching through old papers in the Wren Library at Trinity College, Cambridge. In a box of papers, he found 87 pages of Ramanujan’s handwritten work from the last year of his life, with more than 600 formulas. It became known as the “lost notebook”. Mathematicians have spent decades proving the results in it, and many of its ideas are now used in modern mathematics and even in physics.

Today, India celebrates National Mathematics Day every year on 22 December, Ramanujan’s birthday. It was announced by the Government of India in December 2011, and has been celebrated since 2012.

Ramanujan’s story shows that a great idea can come from anywhere: from a small town, from a person without a degree, from a slate and a piece of chalk. What matters most is curiosity, hard work and the courage to share your ideas with the world.

Puzzle time! How well did you read?

In the story, you learnt that 4 has 5 partitions. How many partitions does the number 5 have?

Enjoyed this story? Share it with a friend!

Invite your friends and family to read a new true maths story every Sunday.

Sources

This story is based on these published sources:

  1. MacTutor History of Mathematics Archive, University of St Andrews: “Srinivasa Ramanujan (1887–1920)”.
  2. G. H. Hardy, “Srinivasa Ramanujan” (obituary), Proceedings of the London Mathematical Society, 1921.
  3. G. H. Hardy, Ramanujan: Twelve Lectures on Subjects Suggested by His Life and Work, Cambridge University Press, 1940.
  4. Robert Kanigel, The Man Who Knew Infinity: A Life of the Genius Ramanujan, Charles Scribner’s Sons, 1991.
  5. George E. Andrews and Bruce C. Berndt, Ramanujan’s Lost Notebook, Springer.
  6. The Royal Society, “Head of steam” (on Ardaseer Cursetjee, its first Indian Fellow), 2021.
  7. Press Information Bureau, Government of India: National Mathematics Day backgrounder, December 2022.

Did you know?

A magic square with the numbers 1 to 9 always has 5 in the middle. Its rows, columns and diagonals all add up to 15!