The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A157480 a(n) = least prime p such that p + prime(n) is a square. 5
 2, 13, 11, 2, 5, 3, 19, 17, 2, 7, 5, 107, 23, 101, 2, 11, 5, 3, 257, 29, 71, 2, 17, 11, 3, 43, 41, 37, 467, 31, 17, 13, 7, 5, 47, 173, 167, 1601, 2, 23, 17, 719, 5, 3, 59, 701, 113, 2, 29, 347, 23, 17, 83, 5, 67, 61, 131, 53, 47, 43, 41, 31, 17, 13, 11, 7, 569, 239, 53, 227, 47, 2 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 LINKS Zak Seidov, Table of n, a(n) for n = 1..10000 EXAMPLE The difference between prime 3 and the square 16 is 13 which is prime and in the sequence. MATHEMATICA Table[p=Prime[n]; b=Ceiling[Sqrt[p]]; While[!PrimeQ[x=b^2-p], b++]; x, {n, 72}] PROG (PARI) g(n)= c=0; forprime(x=2, n, for(k=1, n^2, if(issquare(x+k)&&isprime(k), print1(k", "); c++; break))); c CROSSREFS Sequence in context: A213825 A333493 A244932 * A213306 A213307 A213305 Adjacent sequences:  A157477 A157478 A157479 * A157481 A157482 A157483 KEYWORD nonn AUTHOR Cino Hilliard, Mar 01 2009 EXTENSIONS Better definition and Mma program from Zak Seidov, Mar 14 2013 STATUS approved

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

Last modified September 29 18:27 EDT 2020. Contains 337432 sequences. (Running on oeis4.)