login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A050987 Number of n-digit left-truncatable primes. 18
4, 11, 39, 99, 192, 326, 429, 521, 545, 517, 448, 354, 276, 212, 117, 72, 42, 24, 13, 6, 5, 4, 3, 1, 0 (list; graph; refs; listen; history; text; internal format)
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.
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
Sequence in context: A255706 A355888 A203161 * A137191 A106269 A126758
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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 4 18:21 EDT 2024. Contains 372257 sequences. (Running on oeis4.)