cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-1 of 1 results.

A297350 Start of record gaps between sums of two squares.

Original entry on oeis.org

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

Views

Author

Keywords

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

Examples

			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.
		

Crossrefs

Programs

  • 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 *)
  • 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])
Showing 1-1 of 1 results.