Image: Unknown photographer (public domain)1729, the number on Hardy's taxi
In 1919 Srinivasa Ramanujan was ill in a nursing home at Putney, in south-west London, and G. H. Hardy went to see him. Hardy told the story himself, in his 1940 memoir of Ramanujan: he had come in taxi number 1729, and remarked that the number seemed rather a dull one and that he hoped it was not an unfavourable omen. "No," Ramanujan replied, "it is a very interesting number; it is the smallest number expressible as the sum of two cubes in two different ways."
The two ways are 1729 = 1³ + 12³ = 1 + 1728 and 1729 = 9³ + 10³ = 729 + 1000. The story has been told so often that the mathematics in it tends to get lost. There is quite a lot.
Why it is the smallest
That 1729 has two representations is a matter of checking. That no smaller number has two is a matter of searching, and the search is short enough to do by hand. The cubes below 1729 are 1, 8, 27, 64, 125, 216, 343, 512, 729, 1000, 1331, and 1728. Form all the sums of two of them, allowing a cube to be used twice, and look for a repeat. There are 78 such sums, and the first number to appear twice is 1729. Ramanujan did not do this search in the taxi; he had noticed the number years earlier, and the identity appears in his notebooks in a more general form. The number was in fact known earlier still: Frénicle de Bessy recorded it in 1657, in the context of Fermat's correspondence.
Whether Ramanujan's reply was spontaneous or remembered does not change what it shows, which is a mind that filed numbers by their properties. Littlewood's remark, reported by Hardy, was that every positive integer was one of Ramanujan's personal friends.
The equation behind it
The equation a³ + b³ = c³ + d³ is a Diophantine equation, an equation to be solved in integers, and it is a cousin of the one in Fermat's margin. Fermat's equation a³ + b³ = c³ has no solution in positive integers, which Euler proved in the 1770s. Allow a fourth cube, and solutions come easily: the equation a³ + b³ = c³ + d³ has infinitely many solutions in positive integers, and Euler found a formula that generates many of them. Ramanujan had his own two-parameter family, written in his lost notebook, which contains 1729 as the simplest case. One way to see that there must be infinitely many is to rewrite the equation as a³ - c³ = d³ - b³ and factor both sides as (a - c)(a² + ac + c²); matching factors in the right way gives a system that can be solved parametrically. The chord method of Unit 7 of the masterclass, applied to the cubic curve x³ + y³ = n, generates new rational solutions from old ones, and for n = 1729 it never runs out.
The taxicab numbers
Define Ta(n) to be the smallest number that is a sum of two positive cubes in n different ways. Then Ta(1) = 2 = 1³ + 1³ and Ta(2) = 1729. Hardy and E. M. Wright noted in their textbook that Ta(n) exists for every n, by a construction like the one above, but gave no values beyond 2.
Ta(3) was found by John Leech in 1957, with a computer at Cambridge: 87,539,319 = 167³ + 436³ = 228³ + 423³ = 255³ + 414³. Ta(4) = 6,963,472,309,248 was found in 1989 by E. Rosenstiel, J. A. Dardis, and C. R. Rosenstiel, and Ta(5) = 48,988,659,276,962,496 by Dardis in 1994, with a confirmation by David Wilson in 1997. Ta(6) = 24,153,319,581,254,312,065,344, a 23-digit number, was shown to have six representations by Randall Rathbun in 2002 and proved to be the smallest by Uwe Hollerbach in 2008. The sequence is A011541 in the On-Line Encyclopedia of Integer Sequences, and six terms is where it stops. Candidates for Ta(7) and beyond are known, but proving that nothing smaller works requires a search over every pair of cubes below a 25-digit number, which is at the edge of what has been done.
The growth is steep: each new representation multiplies the number by something like 10⁵ to 10⁶. There is no formula for Ta(n), no proof of how fast it grows, and no theory that would predict Ta(7) without a search. That is what an unsolved problem looks like at the elementary end of number theory: a question a schoolchild can state, with a frontier that moves only when someone builds a better program.
Variants
Allow negative integers and the numbers shrink. The smallest number that is a sum of two cubes in two ways, with negative cubes allowed, is 91 = 6³ + (-5)³ = 4³ + 3³. These are called cabtaxi numbers, and more of them are known, because the search space is larger and the solutions come sooner. Insist on the cubes being coprime in each representation, and the problem changes again. Replace cubes by fourth powers and you get Euler's 635,318,657 = 59⁴ + 158⁴ = 133⁴ + 134⁴, found in 1772 and still the smallest known; nobody knows whether any number is a sum of two fourth powers in three ways. Replace by fifth powers and no number with two representations is known at all.
Why it belongs in a masterclass
The anecdote is told to show that Ramanujan was extraordinary, which he was. It is more useful as an illustration of what "solving" a Diophantine equation means. For a³ + b³ = c³ there is nothing to find and a proof that there is nothing. For a³ + b³ = c³ + d³ there is a parametric family, but the family does not produce every solution, and the question of all solutions below a bound is answered only by search. For the least number with n representations there is no theory at all, only computation.
Unit 7 of the masterclass is about equations of the first two kinds. It proves the parametrization of Pythagorean triples, Fermat's descent for fourth powers, and the structure of Pell's equation, and then draws the cubic curve y² = x³ + ax + b and explains how the chord-and-tangent construction turns the rational points on it into a group. The spotlight of the unit is on Manjul Bhargava's work on how many rational points a typical cubic curve has, which is the question of 1729 asked about every cubic equation at once. Hardy's dull number is the door into it.


