The taxicab number
What is the smallest positive whole number that can be written as the sum of two positive cubes in two different ways?
Find the two ways, and explain how you would search for such numbers efficiently.
Show a hint
List the cubes 1, 8, 27, 64, 125, 216, 343, 512, 729, 1000, 1331, 1728 and look for two pairs with the same sum.
Your answer
Solving needs a free account
Answers, streaks and solutions unlock when you are signed in. Reading the question and the hint stays free.
Discussion
Sign in to join the discussion · reading is open to everyone
💡 Discussion rules
- No full solutions here. Hints and approaches only.
- Complexity, edge cases and intuition are the point.
- Interview experiences are welcome. Respect your NDAs.
Loading discussion…
Learn the concepts
The theory behind this question.
Related questions
The number equal to the sum of the cubes of its digitsThe cannonballs that make a square and a pyramidA hundred animals for a hundred poundsThe four-digit number that reverses when multiplied by fourWhy the sum of the first n cubes is always a perfect square
All questions →