login
A297350
Start of record gaps between sums of two squares.
2
0, 2, 5, 20, 74, 90, 185, 377, 986, 1493, 5165, 16109, 16868, 31657, 52393, 101349, 105572, 241882, 284002, 685541, 1437353, 1751296, 1853866, 5588305, 9565544, 13305524, 20875482, 67070173, 135628357, 192085714, 264428585, 345869506, 426063725, 434120338, 672657850
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
STATUS
approved