OFFSET
1,1
COMMENTS
Square roots of squares in A029707. - Michel Marcus, Oct 20 2022
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
25 is a term because the 626th and 625th primes are twin primes: 4639 - 4637 = 2.
MATHEMATICA
t=Table[0, {250}]; t1=Table[0, {250}]; s=0; k=0; Do[s=Prime[1+n^2]-Prime[n^2]; If[s==2, k=k+1; t[[k]]=n; t1[[k]]=Prime[n^2]; Print[{k, n, Prime[n^2]}]], {n, 1, 2500}] t t1
PROG
(PARI) isok(m) = my(p=prime(m^2)); nextprime(p+1) - p == 2; \\ Michel Marcus, Oct 20 2022
(PARI) list(lim) = {my(k = 1, prv = 2); forprime(p = 3, lim, if(p - prv == 2 && issquare(k), print1(sqrtint(k), ", ")); k++; prv = p); } \\ Amiram Eldar, Mar 20 2025
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Aug 21 2002
STATUS
approved
