A065839 Primes found in A065838.
3, 13, 53, 859, 880571, 230836658783, 18727694659923768688081143062632211180505377, 1448985191439414787314128433365601157107793684026416650771108564122239
Offset: 1
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.
The first 62 quaternary digits of Pi (A004603) are 30210033312222020201122030020310301030121202202320003130013031 = 16703571626015105435307505830654230989 in decimal, which is a prime.
Do[ If[ PrimeQ[ FromDigits[ First[ RealDigits[Pi, 4, n]], 4]], Print[n]], {n, 1, 4000} ]
a(6) = 3141601, since this is the smallest prime >= floor(Pi*10^6) = 3141592. Pi = 3.1415926535897932384626433832795028841971…
Table[NextPrime[Floor[Pi 10^n] - 1], {n, 0, 20}] Module[{nn=30,pid},pid=RealDigits[Pi,10,nn][[1]];Table[NextPrime[FromDigits[Take[pid,n]]-1],{n,nn}]] (* Harvey P. Dale, Mar 01 2024 *)
0 is in the sequence since 2, 3, 5, and 7 are all primes; 1 is in the sequence since 31 and 37 are both primes; 2 is in the sequence since 311, 313, and 317 are all primes; 3 is not in the sequence since 3141, 3143, 3147, and 3149 are all composites; 4 is not in the sequence since 31411, 31413, 31417, and 31419 are all composites; 5 is in the sequence since 314159 is a prime; etc.
fQ[n_] := Union[PrimeQ[ 10 IntegerPart[10^n*Pi] + {1, 3, 7, 9}]][[-1]]; k = -1; lst = {}; While[k < 17001, If[ fQ@ k, AppendTo[lst, k + 1]; Print[k + 1]]; k++]; lst Module[{nn=16300,pd},pd=RealDigits[Pi,10,nn][[1]];Select[Range[0,nn],AnyTrue[ 10*FromDigits[Take[pd,#]]+{1,3,7,9},PrimeQ]&]] (* Harvey P. Dale, Aug 14 2022 *)
is(n)=my(d=Pi*10^n\10*10);isprime(d+1) || isprime(d+3) || isprime(d+7) || isprime(d+9) \\ Charles R Greathouse IV, Nov 07 2013
a(n, c=Pi)={ if( n>=precision(c), error("insufficient precision"), !ispseudoprime(c\10^-n--), factor(c\.1^n)[1,1], 0)}
Comments