### Random Post

### Recent Posts

### Recent Comments

### Archives

### Categories

- article (11)
- enigma (1,393)
- misc (4)
- project euler (2)
- puzzle (90)
- puzzle# (61)
- site news (62)
- tantalizer (105)
- teaser (7)
- today (1)

### Site Stats

- 244,211 hits

Programming Enigma Puzzles

1 June 2020

Posted by on **From New Scientist #1704, 17th February 1990** [link]

When I sold my old car last week I noticed something odd about the total mileage (a five figure number) displayed on its milometer: if the digits in this number were summed they formed a perfect square. Also, the results of multiplying this square by the original number was to give a figure which was an exact multiple of the number formed by reversing the digits in the mileage. Furthermore, if the square was multiplied by this reverse number, it gave a figure which was an exact multiple of the mileage.

However, the really strange thing was that when I bought my new car, which had a lower mileage than my old car, exactly the same properties applied to its total mileage. Neither of the totals were divisible by 10 or palindromic (that is, the number formed by reversing the digits was different to the original mileage but also had five figures)

What were the total mileages of: (a) my old car; (b) my new car?

[enigma551]

%d bloggers like this:

The following Python program looks at all possible 5-digit numbers. It runs in 150ms.

Run:[ @repl.it ]Solution:(a) The mileage on the old car was 89991. (b) The mileage on the new car was 19998.We have: