OFFSET
1,3
LINKS
David A. Corneth, Table of n, a(n) for n = 1..7110 (first 300 terms from Harry J. Smith, terms 301..1000 from Zak Seidov)
MATHEMATICA
Join[{0}, Select[Range[50000], IntegerQ[Sqrt[Prime[#] - #]] &]] (* Paolo Xausa, Apr 16 2024 *)
PROG
(PARI) j=[]; for(n=0, 20000, if(n==0 || issquare(prime(n)-n), j=concat(j, n))); j
(PARI) { n=0; default(primelimit, 20000000); for (m=0, 10^9, if (m==0 || issquare(prime(m) - m), write("b064370.txt", n++, " ", m); if (n==300, break)) ) } \\ Harry J. Smith, Sep 13 2009
(PARI)
upto(n) = {
my(t = 0, res = List(0));
forprime(p = 2, oo,
t++;
if(t > n, return(res));
if(issquare(p-t),
listput(res, t)
);
);
} \\ David A. Corneth, Apr 16 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Jason Earls, Sep 26 2001
EXTENSIONS
Edited by Harry J. Smith and N. J. A. Sloane, Sep 13 2009
STATUS
approved