Skip to content
OddMaths
Back to Weird Numbersweird numbers

1729, the Taxicab Number: The 'Dull' Number That Wasn't

A famous mathematician called the number on his taxi 'rather dull'. His friend replied that it was in fact very interesting, because it is the smallest number that is the sum of two cubes in two different ways.

Even a boring-looking number plate can hide something amazing.

The story goes like this. The mathematician G. H. Hardy went to visit his friend Srinivasa Ramanujan, who was ill in hospital in Putney, London. Hardy later wrote that he had arrived in a taxi with the number 1729, and he told Ramanujan it seemed "rather a dull one".

Ramanujan disagreed. He said that 1729 is a very interesting number. What was he talking about?

1729 can be made by adding two cubes, and it can be done in two different ways.

First, What's a Cube?

A cube number is a number multiplied by itself three times:

1³ = 1 × 1 × 1 = 1
2³ = 2 × 2 × 2 = 8
3³ = 3 × 3 × 3 = 27
9³ = 729
10³ = 1,000
12³ = 1,728

Think of a big cube built from little cubes. A 3 × 3 × 3 cube has 27 little cubes in it.

Stop and Think

Here's the challenge:

Can you find two cubes that add up to 1729? There are two different pairs!

Hint 1: Look at the list above. Is there a cube that is very close to 1729?
Hint 2: What is 1729 − 1,728?
Hint 3: For the second pair, try cubes that are around the same size as each other, not one big and one tiny.

The Reveal

1729 = 1³ + 12³ = 1 + 1,728
1729 = 9³ + 10³ = 729 + 1,000

Two completely different pairs of cubes, and the same total!

That's what Ramanujan meant. And he said something even more special: 1729 is the smallest number that can be written as the sum of two positive cubes in two different ways.

Is It Really the Smallest?

You can check. Any sum smaller than 1729 can only use cubes of the numbers 1 to 12, because 13³ is already 2,197. So we asked a computer to add up every pair of those cubes and look for repeats below 1729. It found none. 1729 is the first number that shows up twice.

Here are the next few numbers that can be made in two different ways, which we also found by computer:

4104 = 2³ + 16³ = 9³ + 15³
13,832 = 2³ + 24³ = 18³ + 20³

Why "Taxicab"?

Because of that taxi ride! The smallest number that can be made as a sum of two positive cubes in a given number of ways is called a taxicab number. 1729 is the one for two ways. The one for three ways is much bigger:

87,539,319 = 167³ + 436³ = 228³ + 423³ = 255³ + 414³

You wouldn't find that by trial and error with a pencil.

A Bonus Fact

Here's something else about 1729:

1729 = 7 × 13 × 19

So it's the product of three different prime numbers. (And look: 1729 is just one more than the cube 12³ = 1,728.)

Try It Yourself

Check 4104. Work out 2³ + 16³ and 9³ + 15³. Do you get 4104 both times? (Hint: 16³ = 4,096 and 15³ = 3,375.)

Check 13,832. Work out 2³ + 24³ and 18³ + 20³. (Hint: 24³ = 13,824.)

One more than a cube. 12³ is 1,728. How is 1729 related to it? Which of the two ways to make 1729 uses that cube?

Check your answers: 2³ + 16³ = 8 + 4,096 = 4,104 and 9³ + 15³ = 729 + 3,375 = 4,104. For 13,832: 8 + 13,824 = 13,832 and 5,832 + 8,000 = 13,832. And 1729 is exactly one more than 12³ = 1,728, which is why one of its two pairs is 12³ + 1³.

The OddMaths Takeaway

Numbers are full of hidden stories, even ones that look dull. 1729 is special because two different pairs of cubes are secretly the same number. And that trick of looking at a number from different angles is exactly how mathematicians find new patterns.

Next time you see a number, ask yourself: what's interesting about this one? There might be a Ramanujan-sized answer hiding in it.

🎯 Test Your Skill

Hop in. The meter is running!