### Random Post

### Recent Posts

### Recent Comments

### Archives

### Categories

- article (11)
- enigma (1,123)
- misc (2)
- project euler (2)
- puzzle (31)
- site news (43)
- tantalizer (31)
- teaser (3)

### Site Stats

- 168,353 hits

Programming Enigma Puzzles

17 April 2012

Posted by on **From New Scientist #2701, 28th March 2009** [link]

Harry chose two 2-digit numbers and added them together to create a third 2-digit number. Each of the three numbers was the product of two primes; the six primes were all different.

He then transposed the unit digits of his first two numbers to create two new numbers, which he added together to create the same third number as before. Once again each of the three numbers was the product of two primes, the six primes all being different.

What was the ‘third number’ common to both sums?

**Hint:** The phrase *“transposing the unit digits of the first two numbers”* means going from **AB** &** CD** to **AD** &** CB**.

[enigma1538]

Advertisements

%d bloggers like this:

Here’s my original Perl code. It runs in 14ms.

Solution:The common number in both sums is 93.And here’s a Python solution. It uses the prime sieve in the

enigma.pylibrary. It runs in 36ms.