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!)
A198018 Yet unseen primes occurring within the first 1,2,3,4,... digits of Pi, A000796 (ordered according to position of last, then initial digit). 6
3, 31, 41, 5, 314159, 14159, 4159, 59, 2, 1592653, 653, 53, 141592653589, 89, 415926535897, 5926535897, 6535897, 35897, 5897, 97, 7, 358979, 58979, 79, 589793, 9265358979323, 9323, 23, 93238462643, 462643, 643, 43, 433, 41592653589793238462643383, 89793238462643383, 38462643383, 2643383, 383, 83 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Consider the first, then the first two, then the first three, ..., terms of A000796, i.e., decimal digits of Pi. Look whether the concatenation of a certain number of subsequent digits yields a prime which did not yet occur earlier (and thus necessarily involves the last of the considered digits). If so, add this prime to the sequence.
Contains A005042 as a subsequence.
LINKS
EXAMPLE
The first digit of the sequence is the prime a(1)=3.
The first two digits, "3.1", yield the prime a(2)=31.
In "3.14" there are no more primes. In "3.141" there is the prime a(3)=41.
In "3.1415" there is the prime a(4)=5.
In "3.14159" we have the primes 314159, 14159, 4159 and 59.
PROG
(PARI) {my(PI=digits(Pi\.1^30), seen=[]); for(i=1, #PI-1, for(j=1, i, my(p=fromdigits(PI[j..i])); !isprime(p) || setsearch(seen, p) || print1(p", ") || seen=setunion(seen, [p])))} \\ edited to use current PARI syntax by Andrew Howroyd and M. F. Hasler, May 10 2021
(PARI) {my(a=List()); for(m=0, precision(.)-3, my(pi=Pi\.1^m, p); for(k=0, m, !isprime(p=pi%10^(m-k+1)) && setsearch(Set(a), p) && listput(a, p))); a} \\ M. F. Hasler, May 10 2021
CROSSREFS
Cf. A198019 ("new" primes ordered w.r.t. their size instead of starting position).
Sequence in context: A090151 A198187 A198019 * A211003 A068331 A177104
KEYWORD
nonn,base,dumb
AUTHOR
M. F. Hasler, Oct 20 2011
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 April 24 13:04 EDT 2024. Contains 371945 sequences. (Running on oeis4.)