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”).

A132955
Smallest prime in a sequence of n consecutive primes which add to a perfect square.
4
17, 13, 5, 181, 587, 13, 163, 2, 13789, 1013, 163, 653, 11, 3931, 397, 2039, 439, 4447, 1217, 269, 1733, 3, 5, 2239, 197, 3, 1061, 14563, 1901, 3, 149, 359, 2137, 67, 433, 11, 907, 2339, 673, 19181, 11593, 89, 6883, 3, 28571, 997, 43, 3559, 2287, 1931, 911
OFFSET
2,1
COMMENTS
Essentially the same as A073887.
FORMULA
a(n)={ min prime(k): [ sum(j=k..k+n-1) prime(j)] in A000290}. - R. J. Mathar, Nov 27 2007
EXAMPLE
a(2)=17, because it is the smallest prime in a sequence of n=2 consecutive primes, which add to a perfect square, namely 17+19=36=6^2. The sums of earlier pairs, 2+3, 3+5, 5+7, 7+11 etc. fail to produces sums which are any perfect square.
MATHEMATICA
Module[{prs=Prime[Range[3200]]}, Table[First[SelectFirst[Partition[ prs, n, 1], IntegerQ[ Sqrt[Total[#]]]&]], {n, 2, 52}]] (* The program uses the SelectFirst function from Mathematica version 10 *) (* Harvey P. Dale, Sep 06 2015 *)
PROG
(PARI) a(n) = {ip = 1; while (! issquare(sum(i=ip, ip+n-1, prime(i))), ip++); prime(ip); } \\ Michel Marcus, Jun 08 2014
CROSSREFS
Sequence in context: A369490 A279232 A073887 * A217893 A063518 A168250
KEYWORD
easy,nonn
AUTHOR
Enoch Haga, Sep 06 2007
EXTENSIONS
Edited by R. J. Mathar, Nov 27 2007
STATUS
approved