If you have watched the movie The Man Who Knew Infinity, you probably remember the scene when Hardy and Ramanujan were going to take a taxi whose plate number is 1729.
While Hardy commented that the number is dull, Ramanujan told him that the number is actually interesting, as it is the smallest number that can be expressed as the sum of two cubes in two different ways. The scene is an adaptation of the following note by Hardy in [G.H. Hardy (1921), “Srinivasa Ramanujan”, Proc. London Math. Soc., s2-19 (1): xl–lviii]:
“I remember once going to see him when he was ill at Putney. I had ridden in taxi cab number 1729 and remarked that the number seemed to me rather a dull one, and that I hoped it was not an unfavorable omen. “No,” he 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 different ways are 93 + 103 = 13 + 123 = 1729. Ramanujan knew this fact through series expansions of some rational functions [ThatsMaths (2016), “Ramanujan’s Astonishing Knowledge of 1729”].
We could also obtain such numbers through another way. Recall that for the squares, we have the identity
(ac + bd)2 + (ad – bc)2 = (ac – bd)2 + (ad + bc)2 = (a2 + b2)(c2 + d2).
This gives us ways to express some numbers as sums of two squares in two different ways. For example, by taking a = 1, b = 2, c = 2, and d = 3, we have 82 + 12 = 42 + 72 = 65.
As for the cubes, we have the following theorem [B. Reznick (2016), “Ramanujan Memorial Lecture”]:
Theorem: If 3c2d = a2 + ab + b2, then (a + cd2)3 + (bd + c)3 = (ad + c)3 + (b + cd2)3.
Proof: Exercise 🙂
Now, if we take a = 0, b = 3, c = 1, and d = 3, then we get 93 + 103 = 13 + 123, the smallest possible number 1729 which is expressible as the sum of two cubes in two different ways. Next, we can take a = 1, b = 4, c = 1, and d = 7, and obtain 503 + 293 = 83 + 533. This is too big! How do we get the second smallest number that can be expressed as the sum of two cubes in two different ways?
We notice that if the quadruple (a, b, c, d) satisfies 3c2d = a2 + ab + b2, then so do the quadruples (b, a, c, d), (-a, –b, c, d), and (a, b, –c, d). Upon taking a = 1, b = 4, c = -1, and d = 7, we get (-48)3 + 273 = 63 + (-45)3, which gives 273 + 453 = 63 + 483. But each number is a multiple of 3, thus if we divide all terms by 33, we obtain 93 + 153 = 23 + 163 = 4104, which is known as the second smallest number expressible as the sum of two cubes in two different ways. Hooray!
Problem: Can you get the third smallest number, that is, 13832, through the above theorem?