OFFSET
1,2
COMMENTS
Numbers of the form A001481(i) such that the difference A001481(i+1)-A001481(i) reaches record values, where i is the index of a(n) in A001481. - Felix Fröhlich, Jan 09 2018
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..43
EXAMPLE
20 = 4^2 + 2^2 and 25 = 5^2 + 0^2 are both sums of two squares, but none of 21, 22, 23, or 24 are, and no previous gap is as long as 25 - 20 = 5.
MATHEMATICA
Block[{s = Select[Range[0, 10^6], SquaresR[2, #] != 0 &], t}, t = Differences@ s; s[[First@ FirstPosition[t, #] ]] & /@ Union@ FoldList[Max, t]] (* Michael De Vlieger, Jan 09 2018 *)
PROG
(PARI) is2(f)=for(i=if(f[1, 1]==2, 2, 1), #f~, if(bitand(f[i, 2], 1)==1 && bitand(f[i, 1], 3)==3, return(0))); 1
print1(r=0); last=2; forfactored(n=last+1, 10^9, if(!is2(n[2]), next); t=n[1]-last; if(t>r, r=t; print1(", "last)); last=n[1])
CROSSREFS
KEYWORD
nonn
AUTHOR
Charles R Greathouse IV, Dec 28 2017
STATUS
approved