OFFSET
1,2
EXAMPLE
6 is a term because 3 + 1 + 4 + 1 + 5 + 9 = 23, which is prime.
MAPLE
Digits := 2000: it := evalf(Pi, 2000): for i from 1 to 2000 do a[i] := floor(it): it := 10*(it-floor(it)): od: s := 0: for i from 1 to 2000 do s := s+a[i]: if isprime(s) then printf(`%d, `, i) fi: od:
MATHEMATICA
a = First[ RealDigits[ N[ Pi, 300]]]; Do[ If[ PrimeQ[Plus @@ Take[a, n]], Print[n]], {n, 1, 300}]
Flatten[Position[Accumulate[RealDigits[\[Pi], 10, 500][[1]]], _?PrimeQ]] (* Harvey P. Dale, Apr 03 2011 *)
CROSSREFS
KEYWORD
easy,nonn,base
AUTHOR
G. L. Honaker, Jr., Jan 11 2001
EXTENSIONS
More terms from James Sellers, Jan 14 2001
STATUS
approved
