### Random Post

### Recent Posts

- Enigma 1101: Disappearing numbers
- Enigma 410: Most right
- Tantalizer 475: League table
- Enigma 1102: The Apathy Party
- Enigma 409: Hands and feet
- Puzzle 68: Football and addition: letters for digits
- Enigma 1103: Brush strokes
- Enigma 408: Royal numbers
- Tantalizer 476: Take your partners
- Enigma 1104: Odd and even squares

### Recent Comments

Jim Randell on Enigma 1313: Triangles | |

Jim Randell on Enigma 1101: Disappearing… | |

Jim Randell on Enigma 409: Hands and fee… | |

Jim Randell on Enigma 410: Most right | |

geoffrounce on Enigma 1394: Squares and … |

### Archives

### Categories

- article (11)
- enigma (1,097)
- misc (2)
- project euler (2)
- puzzle (24)
- site news (42)
- tantalizer (25)
- teaser (3)

### Site Stats

- 161,695 hits

Here’s my original Perl solution. It runs in 19ms.

Solution:The numbers are 401, 625 and 983.And here’s a similar Python solution. It runs in 44ms.

I couldn’t resist having a go at this one as well:

I think I’ve worked out the little logic:

The digital root of 2009 is 2. The digits 0 to 9 sum to 45,

so we must omit 7 to leave a total 38 with digital root 2.

The primes are necessarily odd, so the square must be too, to give an odd total.

Odd 3-digit squares with no repeated digit are 169, 289, 361, 529, 625, 841, 961

(omitting 729).

If the square were to end in 1, the primes would have to end in 1 and 7, but that repeats the 1;

so 361, 841, and 961 are excluded.

If the square were to end in 9, the primes would have to end in 1 and 9 (duplication!) or 3 and 7, but we’ve excluded 7 from the start.

Therefore the square is 625 and the primes end in 1 and 3.

They have to sum to 1384, and must not start with 3, so 401 is the smallest possible.

By chance we’ve hit on the solution: 401 and 983.