### Random Post

### Recent Posts

### Recent Comments

### Archives

### Categories

- article (11)
- enigma (1,176)
- misc (2)
- project euler (2)
- puzzle (44)
- site news (46)
- tantalizer (48)
- teaser (3)

### Site Stats

- 183,172 hits

Advertisements

Programming Enigma Puzzles

12 February 2016

Posted by on **From New Scientist #1480, 31st October 1985** [link]

Bond sipped his martini. “So you see”, continued M, “this new electronic door-pass means those famous zeros in front of your 007 codename are ignored.

“In fact, as you should know, with preliminary zeros ignored, all agent numbers become one-, two-, or three-digit numbers.”

“When an agent number is entered it must first be checked by the system to see that it is genuine. This is easily done as all agent numbers satisfy the following conditions. They are not only primes, but the first digit of each is a prime, as are the first two digits taken together in the three figure numbers.”

“For security reasons the building is divided into three functional areas, and not every agent number gains access to every area. For access to the equipment store, the digits of an agent’s number, when added successively to produce a single digit, must yield a prime.”

“For access to the administrative area, the digits must, when successively multiplied to produce a single digit, yield a prime.”

“For access to the operational area, the digits of the agent’s number must yield a prime whatever order they are read in.”

“Of course 1, not having a unique distinct factorisation, is not prime.”

“As you can see, the four double 0 agents, whose numbers are single digit primes, have access to all three areas. This leaves only one other number with access to the entire office; we have of course allocated this number to the one other employee who requires total access.”

The question is: what is the tea boy’s agent number?

[enigma332]

Advertisements

%d bloggers like this:

This Python program looks at the security credentials for each possible agent. It runs in 33ms.

Solution:The tea boy is agent 311.