Original entry on oeis.org
3, 13, 881, 14436001, 461952047, 14782465513, 7568622343067, 3968137871002260679, 65013970878501038966321
Offset: 1
A065570
Numbers k such that the first k ternary digits found in the decimal expansion of Pi form a prime.
Original entry on oeis.org
264, 274, 322, 751, 3112, 24842, 32731
Offset: 1
-
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 *)
Showing 1-2 of 2 results.