Right-Truncatable Prime Counter(github.com)
github.com
Right-Truncatable Prime Counter
https://github.com/EbodShojaei/Right-Truncatable-Primes
5 comments
There's a Project Euler problem for finding truncatable prime numbers, from both left and right: https://projecteuler.net/problem=37
Curious about base 2. Obviously if you hit a 0 it's immediately not prime, but maybe adjust the rules so:
- you drill through as many 0's on the right.
- you finish on 1.
3, 5, 7, 11, 13, 15, 17 are all right truncatable, 19 is the first non-truncatable prime in this scheme.
- you drill through as many 0's on the right.
- you finish on 1.
3, 5, 7, 11, 13, 15, 17 are all right truncatable, 19 is the first non-truncatable prime in this scheme.
i dont think smaller radixes make the problem more interesting. the problem is interesting because base 10 has a large branching factor
I think in the base2 reformulation I propose we do not know for certain if the list of numbers terminates, as all Fermat primes are in the set and we don't know if there are infinitely many Fermat primes.
For base-10 and the original rules the set is provably closed.
"Drilling through zeros" makes the branching unbounded.
For base-10 and the original rules the set is provably closed.
"Drilling through zeros" makes the branching unbounded.
1. An RTP must start with {2,3,5,7,9}; and,
2. An RTP must end with {1,3,7,9}.
So, let's take the largest RTP (73939133) and try to "extend" it: there are only four possible extensions: 73939133[1], 73939133[3], 73939133[7], 73939133[9]. None of these are prime. This holds for the other 8-digit RTPs. Therefore, there is no extension to a 9-or-longer RTP. Thus, the list is exhaustive.