A086387 Duplicate of A073264.
3, 5, 2, 5, 3, 5, 7, 3, 2, 3, 2, 3, 3, 3, 2, 7, 5, 2, 7, 3, 3, 7, 5, 5, 2, 7, 5, 2, 3, 7, 2, 2, 2, 3, 2
Offset: 0
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.
n=1000000:the list={1000000,1078499,1084157,1084577,1084604,1084605}, its length including initial term is 6, while composite[1000000]=1084605.
Table[Length[FixedPointList[w+PrimePi[ # ]+1&, w]]-1, {w, 1, 128}]
Pi=3.141592653, so the indices of prime digits are 0,4,6,8,9...
Flatten[Position[RealDigits[Pi,10,200][[1]],?PrimeQ]]-1 (* _Harvey P. Dale, Oct 01 2013 *)
n=10^11: the list= {100000000000, 104118054814, 104280509328, 104286914053, 104287166025, 104287176027, 104287176414, 104287176419}, its length including initial term is 8, so a(11)=8.
Table[Length[FixedPointList[10^w+PrimePi[ # ]+1&, 10^w]]-1, {w, 1, 11}]
Select[ RealDigits[ EulerGamma, 10, 275][[1]], PrimeQ[ # ] &] (* Robert G. Wilson v, Jan 21 2005 *)
Pi = 3.14159265358... so we get 4, 9, 6, 8, ...
Select[First[RealDigits[N[Pi,225]]],CompositeQ] (* Stefano Spezia, Jan 21 2023 *)
n=30: {1073741824, 1128141853, 1130754984, 1130880243, 1130886219, 1130886489, 1130886503, 1130886504}, so a(30)=8.
Table[ Length[ FixedPointList[ 2^n+PrimePi[ # ]+1 &, 2^n]]-1, {n, 0, 45}]
Select[ RealDigits[ GoldenRatio, 10, 275][[1]], PrimeQ[ # ] &] (* Robert G. Wilson v, Jan 21 2005 *)
Select[RealDigits[Khinchin,10,263][[1]],PrimeQ] (* James C. McMahon, Jan 01 2024 *)
The first term is the trivial prime 3, having length=1 digit, so a(1)=1. The next evaluation starts at digit 1: 1 is not prime, 14 is composite, 141 is composite, 1415 is composite, but 14159 is prime, so a(2)=5. The next evaluation starts at digit 4: 4 is composite, 41 is prime, so a(3)=2. The 33rd and 34th digits of Pi are 0 and 2, and "02" converts to 2, a 1-digit prime. Thus, a(33) = 1.
lista(p) = {default(realprecision, p); my(x=Pi, nb=#Str(x), d=digits(floor(x*10^(nb-1)))); for (i=1, #d, my(k=i, j=d[i]); while (! ispseudoprime(j), k++; if (k>#d, j=0; break, j = 10*j+d[k])); if (j==0, break, print1(#Str(j), ", ")););} \\ Michel Marcus, Sep 15 2021
from sympy import S, isprime pi_digits = str(S.Pi.n(10**5+1)).replace(".", "")[:-1] def a(n): s, k = pi_digits[n-1], 1 while not isprime(int(s)): s, k = s + pi_digits[n-1+k], k + 1 return len(str(int(s))) print([a(n) for n in range(1, 19)]) # Michael S. Branicky, Aug 21 2021
Comments