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

%I #30 Apr 11 2021 11:58:24

%S 4,11,39,99,192,326,429,521,545,517,448,354,276,212,117,72,42,24,13,6,

%T 5,4,3,1,0

%N Number of n-digit left-truncatable primes.

%C 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

%H I. O. Angell and H. J. Godwin, <a href="http://dx.doi.org/10.1090/S0025-5718-1977-0427213-2">On Truncatable Primes</a>, Math. Comput. 31, 265-267, 1977.

%H P. De Geest, <a href="http://www.worldofnumbers.com/truncat.htm">The list of 4260 left-truncatable primes</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/TruncatablePrime.html">Truncatable Prime.</a>

%H <a href="/index/Pri#primepop">Index entries for sequences related to numbers of primes in various ranges</a>

%H <a href="/index/Tri#tprime">Index entries for sequences related to truncatable primes</a>

%o (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

%o (Python)

%o from sympy import isprime

%o def alst():

%o primes, alst = [2, 3, 5, 7], [4]

%o while len(primes) > 0:

%o candidates = set(int(d+str(p)) for p in primes for d in "123456789")

%o primes = [c for c in candidates if isprime(c)]

%o alst.append(len(primes))

%o return alst

%o print(alst()) # _Michael S. Branicky_, Apr 11 2021

%Y Cf. A033664, A024785, A032437, A020994, A024770, A052023, A052024, A052025, A050986.

%K base,nonn,easy,fini,full

%O 1,1

%A _Eric W. Weisstein_

%E Edited by _Ray Chandler_, Mar 13 2007

%E a(25) = 0 added by _M. F. Hasler_, Nov 07 2018

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 April 24 11:21 EDT 2024. Contains 371936 sequences. (Running on oeis4.)