A033998 Numbers n such that the sum of the primes <= n is a square.
23, 22073, 67187, 79427, 10729219, 3531577135439
Offset: 1
Keywords
Examples
2+3+5+7+11+13+17+19+23 = 10^2 is a square, so 23 is in the sequence.
Links
- G. L. Honaker Jr. and C. Caldwell, Prime Curios!: 9
- G. L. Honaker Jr. and C. Caldwell, Prime Curios!: 3531577135439
- C. Riveras, PrimePuzzles.Net, Problem 9: Sum of first k primes is perfect square
Programs
-
Mathematica
Prime[#]&/@Flatten[Position[Accumulate[Prime[Range[710000]]],?(IntegerQ[ Sqrt[#]]&)]] (* This program will generate the first 5 terms of the sequence. *) (* _Harvey P. Dale, Jun 22 2013 *)
-
PARI
s=0;forprime(p=2,1e6,if(issquare(s+=p),print1(p", "))) \\ Charles R Greathouse IV, Feb 01 2013
Formula
a(n) = Prime(A033997(n))
Extensions
3531577135439 from Giovanni Resta, May 27 2003
Edited by Ray Chandler, Mar 20 2007