### Random Post

### Recent Posts

### Recent Comments

### Archives

### Categories

- article (11)
- enigma (1,383)
- misc (4)
- project euler (2)
- puzzle (90)
- puzzle# (56)
- site news (61)
- tantalizer (101)
- teaser (7)
- today (1)

### Site Stats

- 240,810 hits

Programming Enigma Puzzles

8 September 2013

Posted by on **From New Scientist #2554, 3rd June 2006**

Any number which is the sum of all the perfect squares from 1 to

x² is called a square pyramidal number (such as 1, 5, 14, 30, 55). Any number which is the sum of the firstxtriangular numbers is called a tetrahedral number (such as 1, 4, 10, 20, 35). Within each of the following two statements digits have been consistently replaced by capital letters, different letters being used for different digits. But the two statements are entirely distinct – a letter need not have the same value in one statement as in the other.

Statement 1:ONE and FIVE are both odd square pyramidal numbers.

Statement 2:ONE is an odd tetrahedral number and FOUR is an even tetrahedral number.Find the numbers represented by: (a) ONE and FIVE in Statement 1, and (b) ONE and FOUR in Statement 2.

This is the 500th *Enigma* puzzle published to the site. Hooray!

There is now complete coverage from June 2006 to the most recent puzzle (i.e. the last seven years), and also Classic puzzles from the start of *Enigma* in February 1979 up to August 1981. The most recent puzzle published is **Enigma 1765**, so this puts us at just over 28% of all Enigma puzzles ever published available on the site.

[enigma1394]

%d bloggers like this:

This Python program runs in 35ms.

Solution:(a) ONE = 285, FIVE = 3795; (b) ONE = 165, FOUR = 7140.I found the answers by observing the output of this program:

Hi Naim. I fixed up the

`sourcecode`

tags for you so the code displays correctly – you’d written [[`language="phyton"`

]] instead of [[`language="python"`

]].Thanks Jim for the correction.

Congratulations Jim for publishing 500th Enigma.

Dear Jim:

This is the most comprehensive longest list of puzzles I have ever seen in the internet so far.

May I reiterate my sincere appreciation of your delicate work with a lot of passion and diligent attention from your end.

We have 1765-500=1215 puzzles left!

Best wishes to you

ahmet

Thanks. So far I’ve been able to track down most of the puzzles I’ve published from online sources, but I estimate there are around 600 that I’ll need to find a copy of the New Scientist in question for. So I’ll be making a trip to Bristol Central Library soon to see if they can help me.

This Enigma proved a bit messy in MiniZinc as I had to comment out code needed for Statement 1 to run Statement 2 as a separate programme, which the code now shows.