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
KEYWORD
nonn
AUTHOR
Cino Hilliard, Mar 01 2009
EXTENSIONS
Better definition and Mma program from Zak Seidov, Mar 14 2013
STATUS
approved