The OEIS is supported by the many generous donors to the OEIS Foundation. 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

%I

%S 1,17,13,5,181,587,13,163,2,13789,1013,163,653,11,3931,397,2039,439,

%T 4447,1217,269,1733,3,5,2239,197,3,1061,14563,1901,3,149,359,2137,67,

%U 433,11,907,2339,673,19181,11593,89,6883,3,28571,997,43,3559,2287,1931

%N 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.

%H Zak Seidov, <a href="/A073887/b073887.txt">Table of n, a(n) for n = 1..1000</a>

%F 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.

%e a(5) = prime(42) = 181 because 181+191+193+197+199 = 961 = (31)^2.

%o (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

%K nonn

%O 1,2

%A _Amarnath Murthy_, Aug 17 2002

%E Edited and extended by Bruce Corrigan (scentman(AT)myfamily.com), Oct 20 2002

%E a(10) and a(21)-a(51) from _Donovan Johnson_, May 08 2010

%E Obsolete comment deleted by _Zak Seidov_, Dec 13 2014

%E Typo in Name fixed by _Zak Seidov_, Jul 07 2015

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.

Last modified February 6 01:28 EST 2023. Contains 360091 sequences. (Running on oeis4.)