OFFSET
1,2
LINKS
Robert Israel, Table of n, a(n) for n = 1..1000
MAPLE
Res:= NULL: p:= 2; count:= 0:
for n from 1 while count < 100 do
q:= p; p:= nextprime(p);
if issqr(2*q-p) then count:= count+1; Res:= Res, n; fi
od:
Res; # Robert Israel, Mar 02 2020
MATHEMATICA
Select[Range[12000], IntegerQ[(2Prime[ # ] - Prime[ # + 1])^(1/2)] &] (* Ray Chandler, Oct 07 2005 *)
Position[2#[[1]]-#[[2]]&/@Partition[Prime[Range[12000]], 2, 1], _?(IntegerQ[ Sqrt[#]]&)]//Flatten (* Harvey P. Dale, Apr 30 2019 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Giovanni Teofilatto, Sep 28 2005
EXTENSIONS
Corrected and extended by Ray Chandler, Oct 07 2005
STATUS
approved