The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A065570 Numbers k such that the first k ternary digits found in the decimal expansion of Pi form a prime. 0

%I

%S 264,274,322,751,3112,24842,32731

%N Numbers k such that the first k ternary digits found in the decimal expansion of Pi form a prime.

%t 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} ]

%t 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 *)

%Y Cf. A065832.

%K nonn,base

%O 1,1

%A _Robert G. Wilson v_, Nov 30 2001

%E a(6)-a(7) from _Chai Wah Wu_, Apr 07 2020

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified August 7 23:50 EDT 2022. Contains 355995 sequences. (Running on oeis4.)