The mathematician G. H. Hardy once visited Ramanujan in the hospital and mentioned he had arrived in a taxi numbered 1729, calling it a rather dull number.
Ramanujan immediately replied, “No, it’s very interesting—it’s the smallest number expressible as the sum of two cubes in two different ways: 1³ + 12³ and 9³ + 10³.”
Think about that—lying in a hospital bed, he instantly recognized this property of 1729. No calculator, no pause—he just knew it. That’s why 1729 is now called the Hardy–Ramanujan number, or the first taxicab number.
The next such number, expressible as the sum of two cubes in three different ways, is 87,539,319—much harder to find.
As Littlewood once said, every positive integer seemed like one of Ramanujan’s personal friends—and 1729 is a perfect example of why.