%I #19 Sep 09 2022 10:44:29
%S 0,2,5,20,74,90,185,377,986,1493,5165,16109,16868,31657,52393,101349,
%T 105572,241882,284002,685541,1437353,1751296,1853866,5588305,9565544,
%U 13305524,20875482,67070173,135628357,192085714,264428585,345869506,426063725,434120338,672657850
%N Start of record gaps between sums of two squares.
%C 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
%H Charles R Greathouse IV, <a href="/A297350/b297350.txt">Table of n, a(n) for n = 1..43</a>
%e 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.
%t 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 *)
%o (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
%o 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])
%Y Cf. A001481, A022544, A357018.
%K nonn
%O 1,2
%A _Charles R Greathouse IV_, Dec 28 2017