login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A065570
Numbers k such that the first k ternary digits found in the decimal expansion of Pi form a prime.
0
264, 274, 322, 751, 3112, 24842, 32731
OFFSET
1,1
MATHEMATICA
p = First[ RealDigits[ Pi, 10, 10^5]]; p = p[[ Select[ Range[10^5], p[[ # ]] == 0 || p[[ # ]] == 1 || p[[ # ]] == 2 & ]]]; Do[ If[ PrimeQ[ FromDigits[ Take[p, n], 3]], Print[n]], {n, 1, 4000} ]
Module[{nn=30000, pd}, pd=Select[RealDigits[Pi, 10, nn][[1]], #<3&]; Select[ Range[ Length[pd]], PrimeQ[FromDigits[Take[pd, #], 3]]&]] (* The program generates the first five terms of the sequence. To generate more, increase the constant for "nn, " but it will take a long time to run and the value of nn may be to be 150, 000 or more. *) (* Harvey P. Dale, Jul 31 2020 *)
CROSSREFS
Cf. A065832.
Sequence in context: A229480 A266036 A157828 * A345586 A345844 A253694
KEYWORD
nonn,base
AUTHOR
Robert G. Wilson v, Nov 30 2001
EXTENSIONS
a(6)-a(7) from Chai Wah Wu, Apr 07 2020
STATUS
approved