`re' difficulty?

François Pinard pinard at IRO.UMontreal.CA
Wed Oct 20 19:25:34 EDT 1999


Patrick Phalen <pphalen at teleo.net> écrit:

> Hardy went to visit Ramanujan in the hospital and remarked that his
> taxicab had had a particularly dull number: 1729.  Ramanujan immediately
> remarked, "Oh no, Hardy. It is a very interesting number indeed. It is
> the least number that can be written as the sum of two squares in two
> different ways."

Yes, I remember that story, yet I did not remember the number :-).

> :: [37] is a factor of any number made up by repeating any single digit
> :: some multiple of three times?  (v.g. 111, 222222, 333333333, 444444444444)

> I'm going to choose to imagine that you arrived at the answer above by
> pure intuition.

It was an easy cheat.  I once noticed that 111 = 3 * 37, so making 37 a
bit interesting.  Of course, going from 111 to NNN just means multiply by N.
An going from XYZ to XYZXYZ means multiply by 1001, and XYZXYZXYZ... means
multiply by 1001001...  So you see, the formulation above is just a complex
and flashy (yet a bit empty) way to say nothing more than 111 = 3 * 37. :-)

> I must say I've thoroughly enjoyed your recent contributions to this
> list!

Wow!  You are making my day! :-)  So, it means you forgive me my errances?

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard




More information about the Python-list mailing list