[HN Gopher] Right-Truncatable Prime Counter
___________________________________________________________________
Right-Truncatable Prime Counter
Author : rainmans
Score : 8 points
Date : 2025-05-24 11:54 UTC (3 days ago)
(HTM) web link (github.com)
(TXT) w3m dump (github.com)
| throwawaymaths wrote:
| 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.
| nh23423fefe wrote:
| i dont think smaller radixes make the problem more interesting.
| the problem is interesting because base 10 has a large
| branching factor
| throwawaymaths wrote:
| 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.
| jinwoo68 wrote:
| There's a Project Euler problem for finding truncatable prime
| numbers, from both left and right:
| https://projecteuler.net/problem=37
| thechao wrote:
| Just in case any else is wondering: there are only 83 right-
| truncatable primes (RTP) and that is _it_. There 's two
| constraints that let you see this "immediately":
|
| 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.
___________________________________________________________________
(page generated 2025-05-27 23:02 UTC)