Introduction
Some numbers become memorable because they sit at the crossroads of mathematics and a good story. The number 1729 is one of them. It is famous for being the smallest positive integer that can be written as the sum of two positive cubes in two different ways. Its connection to the mathematician Srinivasa Ramanujan helped turn this neat arithmetic fact into one of mathematics’ best-known anecdotes.
What makes 1729 special?
The defining feature of 1729 is that it has two distinct representations as a sum of two cubes:
13 + 123 = 1 + 1728 = 1729
93 + 103 = 729 + 1000 = 1729
A cube is the result of multiplying a whole number by itself three times. For example, 4 cubed is 4 × 4 × 4, or 64. In the equations above, both pairs of cubes add to the same total, even though the pairs themselves are different.
The word “positive” matters. In the usual definition of this famous property, the numbers being cubed are positive whole numbers, and the two pairs count as different representations. The smallest number with this feature is 1729. A smaller number may be a sum of two cubes, but it cannot be expressed in two distinct ways using positive whole-number bases.
The story behind the number
1729 is often called the Hardy–Ramanujan number because of an anecdote about the British mathematician G. H. Hardy and the Indian mathematician Srinivasa Ramanujan. Hardy later recounted visiting Ramanujan in hospital and mentioning that the taxi he had taken had the number 1729. Hardy described it as an unremarkable number and wondered whether it might be a bad sign.
Ramanujan reportedly saw it differently. He immediately recognized that 1729 was the smallest number expressible as the sum of two positive cubes in two different ways. The story is usually retold as an example of Ramanujan’s remarkable ability to notice mathematical patterns in ordinary numbers. The mathematical result does not depend on the anecdote, but the story gives the number an appealing human context.
It is useful to separate the story from the mathematics. The anecdote explains why many people first hear about 1729; the equations provide the reason it is mathematically distinctive. The number would have the same property even if no famous conversation had ever been associated with it.
Why the two cube sums are surprising
For a given whole number, there are usually many ways to write it as a sum if the allowed ingredients are unrestricted. But requiring the ingredients to be positive cubes makes the search much narrower. Cubes grow quickly: 1, 8, 27, 64, 125, 216, 343, 512, 729, 1000, and 1331 are the cubes of the positive integers from 1 through 11.
To find a number with two representations, one can list sums of pairs of cubes and look for a total that appears twice. For example, 729 + 1000 gives 1729, while 1 + 1728 gives the same total because 1728 is 12 cubed. The two sums use different pairs of bases: 1 and 12 in one case, 9 and 10 in the other.
The bases do not need to be consecutive, as the pair 1 and 12 shows. Nor does the definition require that the two cubes be close in size. What matters is that the two pairs are distinct and have the same sum.
How mathematicians define a taxicab number
A number that can be expressed as a sum of two positive cubes in more than one way belongs to a family known as taxicab numbers. The name is connected to Hardy’s taxi story. In this context, the term refers to a precise mathematical pattern, not to vehicles or transport.
By convention, the first taxicab number is 1, since it can be represented as 13 + 13. The next is 1729, the smallest number with two distinct representations as a sum of two positive cubes. It is often written Ta(2), where the 2 indicates that two representations are required. Naming conventions can vary in more advanced discussions, so the definition being used should always be checked.
Finding later examples becomes harder. A search must consider more possible cubes, and the totals can grow very large before a number with the required number of representations appears. This makes taxicab numbers a simple-to-state but demanding subject: the rule is easy to understand, while proving that a candidate is the smallest can require careful checking.
Other arithmetic features of 1729
The cube-sum property is the best-known fact about 1729, but its ordinary factors reveal another tidy pattern. Its prime factorization is:
1729 = 7 × 13 × 19
Each factor is prime, meaning it has no positive divisors other than 1 and itself. The three primes are evenly spaced: 13 is 6 greater than 7, and 19 is 6 greater than 13. This is a small numerical coincidence, not the reason 1729 is called a taxicab number.
There is also a less obvious connection to number theory. 1729 is the smallest Carmichael number. A Carmichael number is a composite whole number that can behave like a prime in a particular modular arithmetic test, for every integer used in that test. This property is important in the study of primality tests, but it is separate from the two cube representations. In everyday terms, it shows that a single number can be interesting for more than one mathematical reason.
These facts illustrate different ways to study an integer. Factorization asks which primes multiply to make it; the cube-sum question asks which powers can be added to make it; and modular arithmetic examines remainders. None of these descriptions replaces the others. They are different lenses for exploring the same number.
What “smallest” means—and what it does not mean
When mathematicians say 1729 is the smallest number with two cube-sum representations, they mean the smallest positive integer under the stated rules. The rules specify positive whole-number bases and sums of exactly two cubes. Changing those rules can change which number is first.
For instance, allowing negative numbers introduces sums such as a positive cube combined with a negative cube. Allowing more than two terms creates a different problem, and using fourth powers instead of cubes creates another. These are legitimate mathematical questions, but their answers should not be confused with the standard taxicab property of 1729.
Even the word “representation” needs care. Swapping the order of the same two terms does not create a new representation: 13 + 123 is the same pair as 123 + 13. The two representations of 1729 are counted as different because their pairs of bases are genuinely different.
Why 1729 remains useful to learn about
1729 is a compact introduction to several mathematical habits. It encourages readers to look for patterns, distinguish a result from the story attached to it, and pay attention to definitions. It also shows how a question that sounds like a puzzle—can two different pairs of cubes make the same total?—can lead into systematic number theory.
The example is accessible because the arithmetic can be checked directly. A reader can calculate 123 as 1728 and add 1, then calculate 93 as 729 and 103 as 1000. Both totals are 1729. From there, the idea can be extended: search for other sums, ask how many representations a number can have, or explore what changes when the permitted powers or numbers change.
For students, the number can also clarify the difference between a pattern and a proof. Showing the two equations proves that 1729 has two representations. To establish that it is the smallest such number, however, one must also rule out every smaller positive integer. That requires a systematic argument or a careful, complete search—not merely displaying the successful example.
Conclusion
1729 is famous because it is the smallest positive integer that can be written as the sum of two positive cubes in two different ways: 13 + 123 and 93 + 103. The Hardy–Ramanujan anecdote made the fact widely known, while its factors and other number-theory properties offer further ways to explore it. Its appeal lies in how much mathematics can begin with one modest-looking integer.

