cp's OEIS Frontend

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.

Showing 1-1 of 1 results.

A058938 Numbers k such that the sum of the first k digits of the decimal expansion of Pi is prime.

Original entry on oeis.org

1, 6, 8, 13, 20, 21, 34, 36, 48, 56, 63, 87, 89, 92, 94, 104, 106, 107, 111, 116, 117, 118, 120, 130, 132, 133, 141, 146, 147, 162, 170, 173, 179, 183, 185, 186, 198, 202, 203, 206, 215, 217, 219, 220, 225, 242, 248, 249, 258, 264, 265, 270, 271, 285, 290, 291
Offset: 1

Views

Author

G. L. Honaker, Jr., Jan 11 2001

Keywords

Examples

			6 is a term because 3 + 1 + 4 + 1 + 5 + 9 = 23, which is prime.
		

Crossrefs

Programs

  • 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 *)

Extensions

More terms from James Sellers, Jan 14 2001
Showing 1-1 of 1 results.