OFFSET
1,1
COMMENTS
Semiprimes in which repeatedly deleting the rightmost digit gives a semiprime at every step until a single-digit semiprime remains.
The sequence is finite. According to Shyam Sunder Gupta the number 95861957783594714393831931415189937897 is the largest right-truncatable semiprime.
The total number of right-truncatable semiprimes including the single-digit semiprimes 4, 6 and 9 is 56076. - Shyam Sunder Gupta, Jan 13 2008
No term ends in (or contains) 0 else it would be divisible by 2, 5, and some other factor. - Michael S. Branicky, Aug 04 2022
REFERENCES
Shyam Sunder Gupta, Truncatable semi-primes, Mathematical Spectrum 39:3 (2007), pp. 109-112.
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..56076 (full sequence).
I. O. Angell and H. J. Godwin, On truncatable primes, Math. Comput. 31:137, 265-267, 1977.
G. L. Honaker, Jr., Prime Curios! 46613113151331733179
Shyam Sunder Gupta, The largest right-truncatable semiprime. Prime Curios.
PROG
(Python)
from sympy import factorint
from itertools import islice
def issemiprime(n): return sum(factorint(n).values()) == 2
def agen():
semis, digits = [4, 6, 9], "123456789" # can't end in 0
while len(semis) > 0:
yield from semis
cands = set(int(str(p)+d) for p in semis for d in digits)
semis = sorted(c for c in cands if issemiprime(c))
print(list(islice(agen(), 50))) # Michael S. Branicky, Aug 04 2022
CROSSREFS
KEYWORD
nonn,base,fini,full
AUTHOR
G. L. Honaker, Jr., Jul 20 2003
EXTENSIONS
More terms from Reinhard Zumkeller, Jul 22 2003
More terms from Hugo Pfoertner, Jul 22 2003
STATUS
approved