On this page
In mathematics, numbers often hide surprising properties. Take 1729. At first glance, it looks ordinary—just another four-digit number. Yet, mathematicians call it the Hardy-Ramanujan number.
Its fame comes from a visit by an English mathematician to his sick friend, and from a property involving the sums of cubes. It is a story that shows how deeply mathematicians look at numbers, and it is a classic example of number theory that appears in both mathematics history and school arithmetic.
Why is 1729 called the Hardy-Ramanujan number?
The name comes from a conversation around 1919 involving two of the century's great mathematicians: the Indian genius Srinivasa Ramanujan (1887–1920) and the English number theorist G.H. Hardy.
Ramanujan had initially developed his own mathematical research in isolation in India. When he tried to show his work to professional mathematicians, many dismissed it because his methods were so unfamiliar. Seeking someone who could understand his highly original theorems, he began a mail correspondence with Hardy in 1913, which eventually brought him to the University of Cambridge.
This background makes the 1729 story even more remarkable. Ramanujan, who had made groundbreaking contributions to mathematical analysis and infinite series, was lying ill in a hospital in Putney, London. Hardy went to visit him, riding in a taxicab with the number 1729. Trying to start a conversation, Hardy remarked that the number seemed rather dull, hoping it was not a bad omen.
Ramanujan replied immediately: "No, it is a very interesting number; it is the smallest number expressible as the sum of two cubes in two different ways."
Though the French mathematician Bernard Frénicle de Bessy had first published this exact property in 1657, it was this spontaneous exchange between Hardy and Ramanujan that made 1729 famous. Throughout his life, Ramanujan independently compiled nearly 3,900 results. His deep familiarity with numbers meant that he instantly recognized the mathematical signature of 1729 the moment Hardy mentioned it.
How do you calculate the cubes of 1729?
Ramanujan meant that 1729 can be written as the sum of two positive integer cubes) using two different pairs of numbers.
Let us check the first way, using 1 and 12:
The cube of 1 is 1 × 1 × 1 = 1.
The cube of 12 is 12 × 12 × 12 = 1728.
Their sum is 1 + 1728 = 1729.
Now let us check the second way, using 9 and 10:
The cube of 9 is 9 × 9 × 9 = 729.
The cube of 10 is 10 × 10 × 10 = 1000.
Their sum is 729 + 1000 = 1729.
Working with these powers requires knowing how to multiply a number by itself three times, a core arithmetic skill taught when students learn cubes and cube roots in Class 8.
What is a taxicab number?
Because of Hardy's taxi, mathematicians gave these numbers a name. A taxicab number, written as Ta(n), is defined as the smallest integer that can be expressed as a sum of two positive integer cubes in *n* distinct ways.
Ta(1) is the smallest number expressible in one way, which is 2 (1³ + 1³).
Ta(2) is the smallest number expressible in two ways, which is 1729.
In 1938, G.H. Hardy and E.M. Wright proved that such numbers exist for all positive integers *n*. While their proof can be turned into a computer program to generate such numbers, finding the absolute smallest one—the true taxicab number—for a large *n* is still a demanding computational task.
Number theory and learning mathematics
The story of 1729 is more than a piece of trivia. It highlights what number theory is: the search for patterns and properties in whole numbers. Mathematicians like Ramanujan and modern field leaders like Manjul Bhargava spend their careers exploring these deep relationships.
Noticing patterns is at the heart of learning mathematics. When you study cube roots of unity for competitive exams or solve equations involving higher powers, you are using the same foundational arithmetic rules Ramanujan did.
If you are exploring patterns in algebra or number theory, the Fermi Concept Library explains these ideas step by step. Its AI tutor works out what you already know and builds a plan for the session, helping you understand the rules behind the formulas.



