login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A073887 Smallest prime p such that sum of p and the next n-1 primes is a perfect square, or 1 if no such prime exists. 2
1, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
Let p(k) be the k-th prime: p(1)=2, p(2)=3 etc. Define a(1)=1 and a(n)=p(k) such that p(k)+p(k+1)+...+p(k+n-1)=m^2 and there is no prime <p(k) such that this is true; or set a(n) = 0 if no such p(k) exists.
EXAMPLE
a(5) = prime(42) = 181 because 181+191+193+197+199 = 961 = (31)^2.
PROG
(PARI) a(n) = {if (n==1, return (1)); forprime(p=2, , k = primepi(p); if (issquare(sum(i=k, k+n-1, prime(i))), return (p)); ); } \\ Michel Marcus, Dec 13 2014
CROSSREFS
Sequence in context: A164064 A369490 A279232 * A132955 A217893 A063518
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Aug 17 2002
EXTENSIONS
Edited and extended by Bruce Corrigan (scentman(AT)myfamily.com), Oct 20 2002
a(10) and a(21)-a(51) from Donovan Johnson, May 08 2010
Obsolete comment deleted by Zak Seidov, Dec 13 2014
Typo in Name fixed by Zak Seidov, Jul 07 2015
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 03:01 EDT 2024. Contains 371767 sequences. (Running on oeis4.)