Skip to the Main Content

Note:These pages make extensive use of the latest XHTML and CSS Standards. They ought to look great in any standards-compliant modern browser. Unfortunately, they will probably look horrible in older browsers, like Netscape 4.x and IE 4.x. Moreover, many posts use MathML, which is, currently only supported in Mozilla. My best suggestion (and you will thank me when surfing an ever-increasing number of sites on the web which have been crafted to use the new standards) is to upgrade to the latest version of your browser. If that's not possible, consider moving to the Standards-compliant and open-source Mozilla browser.

February 28, 2022

Hardy, Ramanujan and Taxi No. 1729

Posted by John Baez

In his book Ramanujan: Twelve Lectures on Subjects Suggested by His Life and Work, G. H. Hardy tells this famous story:

He could remember the idiosyncracies of numbers in an almost uncanny way. It was Littlewood who said every positive integer was one of Ramanujan’s personal friends. I remember once going to see him when he was lying ill at Putney. I had ridden in taxi-cab No. 1729, and remarked that the number seemed to be rather a dull one, and that I hoped it was not an unfavourable 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.”

Namely,

10 3+9 3=1000+729=1729=1728+1=12 3+1 3 10^3 + 9^3 = 1000 + 729 = 1729 = 1728 + 1 = 12^3 + 1^3

But there’s more to this story than meets the eye.

First, it’s funny how this story becomes more dramatic with each retelling. In the foreword to Hardy’s book A Mathematician’s Apology, his friend C. P. Snow tells it thus:

Hardy used to visit him, as he lay dying in hospital at Putney. It was on one of those visits that there happened the incident of the taxicab number. Hardy had gone out to Putney by taxi, as usual his chosen method of conveyance. He went into the room where Ramanujan was lying. Hardy, always inept about introducing a conversation, said, probably without a greeting, and certainly as his first remark: “I thought the number of my taxicab was 1729. It seemed to me rather a dull number.” To which Ramanujan replied: “No, Hardy! No, Hardy! It is a very interesting number. It is the smallest number expressible as the sum of two cubes in two different ways.”

Here Hardy becomes “inept” and makes his comment “probably without a greeting, and certainly as his first remark”. Perhaps the ribbing of a friend who knew Hardy’s ways?

I think I’ve seen later versions where Hardy “burst into the room”.

But it’s common for legends to be embroidered with the passage of time. Here’s something more interesting. In Ono and Trebat-Leder’s paper The 1729 K3 surface, they write:

While this anecdote might give one the impression that Ramanujan came up with this amazing property of 1729 on the spot, he actually had written it down before even coming to England.

In fact they point out that Ramanujan wrote it down more than once!

Before he went to England, Ramanujan posed a lot of puzzles in the questions section of the Journal of the Indian Mathematical Society. In 1913, in Question 441, he challenged the reader to prove a formula expressing a specific sort of perfect cube as a sum of three perfect cubes. If you keep simplifying this formula to see why it works, you eventually get

12 3=(1) 3+10 3+9 3 12^3 = (-1)^3 + 10^3 + 9^3

In Ramanujan’s Notebooks, Part III, Bruce Berndt explains that Ramanujan developed a method for finding solutions of the diophantine equation a 3+b 3=c 3+d 3a^3 + b^3 = c^3 + d^3 in item 20(iii) of his “second notebook”. This is one of three notebooks he left behind after his death, and the results in this one were written down before Ramanujan first went to England. Here Ramanujan lists many example solutions, the simplest being

1 3+12 3=9 3+10 3 1^3 + 12^3 = 9^3 + 10^3

In 1915 Ramanujan posed another puzzle about writing a sixth power as a sum of three cubes, Question 661. And he posed a puzzle about writing 11 as a sum of three cubes, Question 681.

Finally, much later Ramanujan revisited the diophantine equation a 3+b 3=c 3+d 3a^3 + b^3 = c^3 + d^3 in his so-called Lost Notebook. This was actually a pile of loose unnumbered pages written by Ramanujan. George Andrews found them in a box in Trinity College, Cambridge in 1976.

Now the pages have been numbered, published and studied. Here is page 341 of Ramanujan’s Lost Notebook where he came up with a method for finding an infinite family of solutions to Euler’s diophantine equation a 3+b 3=c 3+d 3a^3 + b^3 = c^3 + d^3:

As you can see, one example is

9 3+10 3=12 3+1 9^3 + 10^3 = 12^3 + 1

In Section 8.5 of George Andrews and Bruce Berndt’s book Ramanujan’s Lost Notebook: Part IV, they discuss Ramanujan’s method here, calling it “truly remarkable”.

In short, Ramanujan was well aware of the special properties of the number 1729 before Hardy mentioned it. And something prompted Ramanujan to study the equation a 3+b 3=c 3+d 3a^3 + b^3 = c^3 + d^3 again near the end of his life, and find a new way to solve it.

Could it have been the taxicab incident??? Or did Hardy talk about the taxi after Ramanujan had just thought about the number 1729 yet again? In the latter case, it’s hardly a surprise that Ramanujan remembered it.

Thinking about this story, I’ve started wondering about what really happened here. First of all, as James Dolan pointed out to me, you don’t need to be a genius to notice that

1000+729=1728+1 1000 + 729 = 1728 + 1

Was Hardy, the great number theorist, so blind to the properties of numbers that he didn’t notice either of these ways of writing 1729 as a sum of two cubes? Base ten makes it very easy to spot if you know your cubes, and I’m sure Hardy knew 9 3=7299^3 = 729 and 12 3=172812^3 = 1728.

Second of all, how often do number theorists come out and say a number is uninteresting? Except in that joke about the “least uninteresting number”, I don’t think I’ve heard it happen.

My wife Lisa suggested an interesting possibility that would resolve these puzzles:

Hardy either knew of Ramanujan’s work on this problem, or noticed himself that 1729 could be written as a sum of perfect cubes in two ways. He wanted to cheer up his dear friend Ramanujan, who was lying deathly ill in the hospital. So he played the fool by walking in and saying that 1729 was “rather dull”.

I have no real evidence for this, but I like how it flips the meaning of the story. And it’s not impossible. Hardy was, after all, a bit of a prankster: each time he sailed across the Atlantic he sent out a postcard saying he had proved the Riemann Hypothesis, just in case he drowned.

We could try to see if there really was a London taxi with number 1729 at that time. It would be delicious to discover that it was merely an invention of Hardy’s. But I don’t know if records of London taxi-cab numbers from around 1919 still exist.

Posted at February 28, 2022 12:55 AM UTC

TrackBack URL for this Entry:   https://golem.ph.utexas.edu/cgi-bin/MT-3.0/dxy-tb.fcgi/3378

12 Comments & 0 Trackbacks

Re: Hardy, Ramanujan and Taxi No. 1729

Do we know whether Hardy’s taxi was motorized or horse-drawn? Your post implies that the famous incident happened in 1919, and Wikipedia says:

In 1910, the number of motor cabs on London streets outnumbered horse-drawn growlers and hansoms for the first time. At the time of the outbreak of World War I, the ratio was seven to one in favor of motorized cabs. The last horse-drawn hackney carriage ceased service in London in 1947.

Probabilities aside, maybe Hardy’s word taxi-cab tells us it was motorized. In British English at least, no one says “taxicab” any more; it sounds nearly as antiquated to my ears as “omnibus”. But I don’t know how the terminology evolved in the early days of motorization.

Sherlock Holmes was always jumping into hireable horse-drawn transport as he hurried off to catch evil-doers. My memory of the stories is that the word used was “carriage”, never “taxicab”. But I’m too lazy to go and check. Sherlock was doing his thing only a couple of decades before the 1729 incident.

(In case you’re wondering why I’m asking, I started trying to find out whether there could plausibly have been a taxi number 1729 in 1919, and quickly ran into this question.)

Posted by: Tom Leinster on February 28, 2022 10:55 PM | Permalink | Reply to this

Re: Hardy, Ramanujan and Taxi No. 1729

Taxi cab itself is short for “taximeter cabriolet”, which sounds even more delightfully old-fashioned. In the US we say alternately “taxi” or “cab”, although both are obsolescent in the advent of Uber. Speaking of which: when exactly did taxi dancers go out of fashion?

I’ll bet there are trained people who know how to solve many such problems in a jiffy. I’m tempted to see if, sometime in March, I can track down some such impressive person who can get to the bottom of 1729. (The amount of obscure crap I waste time trying to track down on my own is considerable.)

Posted by: Todd Trimble on March 1, 2022 3:04 AM | Permalink | Reply to this

Re: Hardy, Ramanujan and Taxi No. 1729

I still say “taxicab” sometimes; it seems natural to me.

For some reason I believe that Hardy rode a taxicab of the motorized variety, a “horseless carriage”. That’s what he does in the movie The Man Who Knew Infinity — not that this is any guarantee of anything. Maybe it’s just that I’ve never heard of a horse-drawn vehicle called a taxicab.

Interestingly, electric taxicabs were used in London before the petrol-powered kind:

Electric battery-powered taxis became available at the end of the 19th century. In London, Walter Bersey designed a fleet of such cabs and introduced them to the streets of London on 19 August 1897. They were soon nicknamed ‘Hummingbirds’ due to the idiosyncratic humming noise they made. In the same year in New York City, the Samuel’s Electric Carriage and Wagon Company began running 12 electric hansom cabs. The company ran until 1898 with up to 62 cabs operating until it was reformed by its financiers to form the Electric Vehicle Company.

The petrol-powered ones came to London in 1903.

Posted by: John Baez on March 1, 2022 5:57 AM | Permalink | Reply to this

An eternity ago, I briefly looked at the 1919 taxi-1729 question here. At the time I found a ‘London taxi-history page’ (link no longer alive) saying that it most likely was a ‘Unic’, and that 1729 was not the taxi-number, but part of its license plate, as in the image here.

Posted by: lieven le bruyn on March 1, 2022 8:01 AM | Permalink | Reply to this

Re:

Wow! That’s impressive. I probably spent an hour on this last night, and found out nowhere near the amount that you did.

The dead link you mention can be recovered using the Wayback Machine.

Posted by: Tom Leinster on March 1, 2022 11:23 AM | Permalink | Reply to this

Re: Hardy, Ramanujan and Taxi No. 1729

Great work, Lieven! But I admit to being disappointed that the image didn’t show a taxi with 1729 as part of its license plate. 5795 seems like a rather dull number.

Posted by: John Baez on March 1, 2022 9:36 PM | Permalink | Reply to this

Re: Hardy, Ramanujan and Taxi No. 1729

As a possible starting point for anyone who wants to amuse themselves (and/or the rest of us) by taking up John’s implicit challenge, may I suggest perusing the OEIS entries that contain 5795.

Posted by: Mark Meckes on March 1, 2022 10:13 PM | Permalink | Reply to this

Re: Hardy, Ramanujan and Taxi No. 1729

But be careful. You have to find something that will really change my mind.

Hardy. Today the number of my taxicab was 5795. This time it’s really dull, I’m afraid.

Ramanujan. No, it is a very interesting number: it’s the fourth number nn such that n2 n+1n 2^n + 1 is prime.

Hardy. Come on, Ramanujan — quit while you’re ahead. That’s boring.

Posted by: John Baez on March 1, 2022 11:10 PM | Permalink | Reply to this

Re: Hardy, Ramanujan and Taxi No. 1729

Well, that would be a lazy approach. I was thinking one could cross-reference OEIS entries to come up with something closer to the form of Ramanujan’s observation, like “It’s the smallest number nn for which rank of the elliptic curve y 2=x 3nxy^2=x^3-n x is 4, and also n2 n+1n 2^n + 1 is prime.”

(Is that actually interesting, or just a random juxtaposition of two facts? I suspect the latter but I honestly have no idea.)

Posted by: Mark Meckes on March 2, 2022 12:41 PM | Permalink | Reply to this

Re: Hardy, Ramanujan and Taxi No. 1729

“No, it is very interesting,” Ramanujan said. “A005795 is the OEIS number for the degrees of the fundamental invariants of the Weyl group W(E 7)W(E_7).”

Posted by: Blake Stacey on March 2, 2022 10:03 PM | Permalink | Reply to this

Re: Hardy, Ramanujan and Taxi No. 1729

I believe your wife’s theory, which has the advantage of painting everyone in the best light, plus the alternatives seem weird and contrived by comparison.

Posted by: bertie on March 1, 2022 12:14 PM | Permalink | Reply to this

Fermat’s Last Theorem

(as mentioned in Ken Ono’s autobiography) Ramanujan was apparently searching for counterexamples to Fermat’s Last Theorem (was obviously unsuccessful) and 1729 was, in some sense, the closest he came to disproving it, i.e. 10^3 + 9^3 is almost equal to 12^3.

Posted by: Abhiram Natarajan on March 14, 2022 2:46 PM | Permalink | Reply to this

Post a New Comment