• Post Reply Bookmark Topic Watch Topic
  • New Topic

truncatable prime numbers  RSS feed

 
Sam Benry
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have this question from euler

The number 3797 has an interesting property. Being prime itself, it is possible to continuously remove digits from left to right, and remain prime at each stage: 3797, 797, 97, and 7. Similarly we can work from right to left: 3797, 379, 37, and 3.

Find the sum of the only eleven primes that are both truncatable from left to right and right to left.

NOTE: 2, 3, 5, and 7 are not considered to be truncatable primes.


I can't figure out the eleven prime numbers, why are these prime numbers wrong:
11
13
17
23
31
37
53
71
73
113
131

aren't they all truncatable from both left and right? and if they are, there are still many more truncatable prime numbers from both left and right... what am I doing wrong?
 
Paul Clapham
Sheriff
Posts: 22828
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1 isn't a prime number, so that rules out many of the numbers in your list.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!