Skip to main content
The National Cipher Challenge

Reply To: Programming

A Tale of 2 Secrets Forums T.E.M.P.E.S.T. Programming Reply To: Programming

#112155
ByteInBits
Participant

I haven’t checked this, but it looks intriguing! Is it right and can you verify it? Harry

\\\\\\\\\\\\\\\\\\\\ Special 4 digit primes \\\\\\\\\\\\\\\\\\\

The prime 3137 is a special prime in that if each digit is removed from the left
a prime still remains thus 3137, 137, 37, 7 all are prime numbers, furthermore
if each digit is removed from the right thus 3137, 313, 31 and 3 all are prime.

Write code to find the only other 4 digit number having this same property.
(Avoid any 4 digit numbers containing zeros)

Post your code and its answer for all to see

Report a problem