OFFSET
1,1
COMMENTS
The sequence is well defined for any positive integer, with a(n) = 0 for n >= 25. But it makes sense to consider it to be full & finite. - M. F. Hasler, Nov 07 2018
LINKS
I. O. Angell and H. J. Godwin, On Truncatable Primes, Math. Comput. 31, 265-267, 1977.
P. De Geest, The list of 4260 left-truncatable primes
Eric Weisstein's World of Mathematics, Truncatable Prime.
PROG
(PARI) A050987=vector(25, n, #p=concat(apply(p->select(isprime, vector(9, i, i*10^(n-1)+p)), if(n>1, p)))) \\ M. F. Hasler, Nov 07 2018
(Python)
from sympy import isprime
def alst():
primes, alst = [2, 3, 5, 7], [4]
while len(primes) > 0:
candidates = set(int(d+str(p)) for p in primes for d in "123456789")
primes = [c for c in candidates if isprime(c)]
alst.append(len(primes))
return alst
print(alst()) # Michael S. Branicky, Apr 11 2021
CROSSREFS
KEYWORD
base,nonn,easy,fini,full
AUTHOR
EXTENSIONS
Edited by Ray Chandler, Mar 13 2007
a(25) = 0 added by M. F. Hasler, Nov 07 2018
STATUS
approved