login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A230327
Index of smallest prime such that the sum of n consecutive primes starting with this specific prime is a square.
2
7, 6, 3, 42, 107, 6, 38, 1, 1631, 170, 38, 119, 5, 546, 78, 309, 85, 604, 199, 57, 270, 2, 3, 333, 45, 2, 178, 1708, 291, 2, 35, 72, 322, 19, 84, 5, 155, 346, 122, 2175, 1395, 24, 886, 2, 3108, 168, 14, 499, 340, 294, 156, 578, 325, 240, 115, 61, 283, 1035
OFFSET
2,1
EXAMPLE
a(2)=7 because 17+19 (2 terms) = 36 is a square, 17 being the 7th prime.
a(3)=6 because 13+17+19 (3 terms) =49 is a square, 13 being the 6th prime.
PROG
(PARI) a(n, lim=10^5) = {n --; pr = primes(lim); for (i = 1, lim-n, s = sum(k=i, i+n, pr[k]); if (issquare(s), return (i)); ); return (0); } \\ Michel Marcus, Oct 16 2013
CROSSREFS
Cf. A064397 (2 primes), A076305 (3 primes), A072849 (4 primes), A166255 (70 primes), A166261 (120 primes).
Cf. A132955 (primes themselves), A132956 (squares=sums), A132957 (square roots of sums).
Sequence in context: A187799 A288935 A132714 * A105419 A288242 A289266
KEYWORD
nonn
AUTHOR
Michel Marcus, Oct 16 2013
STATUS
approved