1729 Taxicab Number: Why Is It So Special?
Quick answer: 1729 is the smallest number that can be written as the sum of two positive cubes in two different ways: 1729 = 1³ + 12³ = 9³ + 10³. It is called the Hardy–Ramanujan number after a famous story: G. H. Hardy visited Srinivasa Ramanujan in hospital in a taxi numbered 1729 and called it a dull number, and Ramanujan immediately replied that it is very interesting for exactly this reason. Such numbers are now called taxicab numbers.
While Srinivasa Ramanujan was ill in Putney, London, the English mathematician G. H. Hardy came to visit him. Hardy later wrote that he had ridden in taxi cab number 1729, which seemed “a rather dull one.” Ramanujan replied that it was a very interesting number: the smallest number expressible as the sum of two cubes in two different ways.
The Two Ways
\[ 1729 = 1^3 + 12^3 = 1 + 1728 \]
\[ 1729 = 9^3 + 10^3 = 729 + 1000 \]
No smaller positive whole number can be written as a sum of two positive cubes in two different ways. You can check this by hand: the positive cubes up to 1729 are 1, 8, 27, 64, 125, 216, 343, 512, 729, 1000, 1331 and 1728, and among all sums of two of them that are at most 1729, only 1729 appears twice. The next such number is \(4104 = 2^3 + 16^3 = 9^3 + 15^3\). Review exponent rules to check the cubes yourself.
Taxicab Numbers
The \(n\)th taxicab number, written \(\text{Ta}(n)\), is the smallest number that is a sum of two positive cubes in \(n\) different ways:
| \(n\) | \(\text{Ta}(n)\) | Found |
|---|---|---|
| 2 | 1,729 | Known to Frénicle de Bessy (1657); Ramanujan’s story |
| 3 | 87,539,319 | John Leech (1957) |
| 4 | 6,963,472,309,248 | E. Rosenstiel, J. A. Dardis and C. R. Rosenstiel (announced 1989, published 1991) |
| 5 | 48,988,659,276,962,496 | John A. Dardis (1994); independently David W. Wilson (1997, published 1999) |
| 6 | 24,153,319,581,254,312,065,344 | Found by Randall Rathbun (2002); confirmed minimal by Uwe Hollerbach (2008) |
Fermat had already shown that, for every \(n\), some number is a sum of two cubes in \(n\) ways; finding the smallest is the hard part.
Other Facts About 1729
- Fermat near-miss: \(9^3 + 10^3 = 12^3 + 1\), so 1729 is one more than a cube. Ramanujan studied such near-misses to Fermat’s Last Theorem, and Ken Ono and Sarah Trebat-Leder (preprint 2015, published 2016 as “The 1729 K3 surface”) showed that his notes anticipated ideas about elliptic curves and K3 surfaces, two different objects studied in modern number theory and geometry.
- Carmichael number: \(1729 = 7 \times 13 \times 19\) is composite, yet \(a^{1728} \equiv 1 \pmod{1729}\) for every base \(a\) that shares no factor with 1729. So it passes Fermat’s primality test for all those bases, a “fake prime”. It is the third Carmichael number, after 561 and 1105.
- Harshad number: its digit sum is \(1 + 7 + 2 + 9 = 19\), and 1729 is divisible by 19, which is what makes it a Harshad number. As an extra curiosity, \(19 \times 91 = 1729\): the digit sum times its own reverse.
Related: Sums of Three Cubes
A related, harder question asks which numbers are sums of three cubes, positive or negative. That is how 42 became famous in 2019; see our sum of three cubes explainer.
Common Misconceptions
“Ramanujan computed it on the spot.” We cannot know what he calculated at the bedside, but he had recorded the identity \(9^3 + 10^3 = 12^3 + 1\) in his notebooks before he came to England.
“Negative cubes count.” Not in the standard definition of taxicab numbers, which uses positive cubes. If you allow negative cubes (the related “cabtaxi” numbers), the answer changes: \(91 = 6^3 + (-5)^3 = 4^3 + 3^3\).
Watch: The Taxicab Number 1729 in Video
If you learn better by watching, these videos are worth your time.
Check Your Understanding
Five quick questions to see how much of this has stuck. Pick an answer and press Submit; you will see a short explanation either way.
Answer each question and press Submit to see your result right away.
Frequently Asked Questions
Why is 1729 special?
1729 is the smallest number that can be written as the sum of two positive cubes in two different ways: 1³ + 12³ and 9³ + 10³.
What is the Hardy–Ramanujan number?
Another name for 1729, after G. H. Hardy’s taxi story in which Ramanujan explained why the number is interesting.
What are taxicab numbers?
Ta(n) is the smallest number expressible as a sum of two positive cubes in n different ways: Ta(1) = 2, Ta(2) = 1729, Ta(3) = 87,539,319, and so on. Only Ta(1) to Ta(6) are known.
Did Ramanujan already know about 1729?
Yes. He had written the identity 9³ + 10³ = 12³ + 1 in his notebooks before he came to England, years before Hardy’s taxi visit.
What is the second taxicab number with two representations?
4104 = 2³ + 16³ = 9³ + 15³ is the next number, after 1729, that is a sum of two cubes in two ways.
Keep Exploring
- Sum of Three Cubes: 42 Solved, 114 Still Open
- Fermat’s Last Theorem Explained: Wiles to Lean
- Kaprekar’s Constant 6174: How the Number Trick Works
Sources and Further Reading
Related to This Article
More math articles
- Intergovernmental relations
- Free Grade 8 English Worksheets for Arizona Students
- 10 Most Common AFOQT Math Questions
- Theories of Aging
- Treasure Hunt in Geometry: How to Navigate Through Polygons’ Scale Drawings
- Ideal Gas Law Calculator: Solve PV = nRT for Pressure, Volume, Moles or Temperature
- How to Solve Trig Ratios of General Angles? (+FREE Worksheet!)
- Rent Calculator: How Much Rent Can I Afford?
- Free Grade 7 English Worksheets for Illinois Students
- The Best Grade 3 ELA Practice Tests for Rhode Island Students


What people say about "1729 Taxicab Number: Why Is It So Special? - Effortless Math"?
No one replied yet.