This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A198018 #28 May 13 2021 01:40:44 %S A198018 3,31,41,5,314159,14159,4159,59,2,1592653,653,53,141592653589,89, %T A198018 415926535897,5926535897,6535897,35897,5897,97,7,358979,58979,79, %U A198018 589793,9265358979323,9323,23,93238462643,462643,643,43,433,41592653589793238462643383,89793238462643383,38462643383,2643383,383,83 %N 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). %C A198018 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. %C A198018 Contains A005042 as a subsequence. %e A198018 The first digit of the sequence is the prime a(1)=3. %e A198018 The first two digits, "3.1", yield the prime a(2)=31. %e A198018 In "3.14" there are no more primes. In "3.141" there is the prime a(3)=41. %e A198018 In "3.1415" there is the prime a(4)=5. %e A198018 In "3.14159" we have the primes 314159, 14159, 4159 and 59. %o A198018 (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 %o A198018 (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 %Y A198018 Cf. A198019 ("new" primes ordered w.r.t. their size instead of starting position). %Y A198018 Cf. A000796, A005042, A047658. %K A198018 nonn,base,dumb %O A198018 1,1 %A A198018 _M. F. Hasler_, Oct 20 2011