

A033997


Numbers n such that sum of first n primes is a square.


5




OFFSET

1,1


COMMENTS

Szabolcs Tengely asks if this sequence is infinite (see Lorentz Center paper). Luca shows that this sequence is of asymptotic density 0. Cilleruelo & Luca give a lower bound.  Charles R Greathouse IV, Feb 01 2013


REFERENCES

Florian Luca, On the sum of the first n primes being a square, Lithuanian Mathematical Journal 47:3 (2007), pp 243247.


LINKS

Table of n, a(n) for n=1..6.
JanHendrik Evertse, Some open problems about Diophantine equations, Solvability of Diophantine Equations conference, Lorentz Center of Leiden University, The Netherlands.
Javier Cilleruelo and Florian Luca, On the sum of the first n primes, Q. J. Math. 59:4 (2008), 14 pp.
G. L. Honaker Jr. and C. Caldwell, Prime Curios!: 9
C. Rivera, PrimePuzzles.Net, Problem 9: Sum of first k primes is perfect square


FORMULA

a(n) = pi(A033998(n)).


EXAMPLE

Sum of first 9 primes is 2+3+5+7+11+13+17+19+23 = 100, which is square, so 9 is in the sequence.


MATHEMATICA

p = 2; s = 0; lst = {}; While[p < 10^7, s = s + p; If[ IntegerQ@ Sqrt@ s, AppendTo[lst, PrimePi@ p]; Print@ lst]; p = NextPrime@ p] (* Zak Seidov, Apr 11 2011 *)


PROG

(PARI) n=0; s=0; forprime(p=2, 1e6, n++; if(issquare(s+=p), print1(n", "))) \\ Charles R Greathouse IV, Feb 01 2013


CROSSREFS

Cf. A000040, A033998, A061888, A061890 (associated squares).
Sequence in context: A323517 A278914 A069704 * A068729 A321282 A159775
Adjacent sequences: A033994 A033995 A033996 * A033998 A033999 A034000


KEYWORD

nonn


AUTHOR

Calculated by Jud McCranie


EXTENSIONS

126789311423 from Giovanni Resta, May 27 2003
Edited by Ray Chandler, Mar 20 2007


STATUS

approved



