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.

A008852 Numbers n such that n^2 and n have same last 2 digits.

Original entry on oeis.org

0, 1, 25, 76, 100, 101, 125, 176, 200, 201, 225, 276, 300, 301, 325, 376, 400, 401, 425, 476, 500, 501, 525, 576, 600, 601, 625, 676, 700, 701, 725, 776, 800, 801, 825, 876, 900, 901, 925, 976, 1000, 1001, 1025, 1076, 1100, 1101, 1125, 1176, 1200, 1201
Offset: 1

Views

Author

Keywords

References

  • L. E. Dickson, History of the Theory of Numbers. Carnegie Institute Public. 256, Washington, DC, Vol. 1, 1919; Vol. 2, 1920; Vol. 3, 1923, see vol. 1, p. 459.

Programs

  • GAP
    a:=[0,1,25,76,100];; for n in [6..60] do a[n]:=a[n-1]+a[n-4]-a[n-5]; od; a; # G. C. Greubel, Sep 13 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 60); [0] cat Coefficients(R!( x*(1 +24*x +51*x^2 +24*x^3)/((1-x)*(1-x^4)) )); // G. C. Greubel, Sep 13 2019
    
  • Maple
    for n to 2000 do if n^2 - n mod 100 = 0 then print(n); fi; od;
  • Mathematica
    Select[Range[1200], Mod[ #, 100] == Mod[ #^2, 100] &] (* Stefan Steinerberger, Apr 15 2006 *)
    LinearRecurrence[{1,0,0,1,-1}, {0,1,25,76,100}, 60] (* G. C. Greubel, Sep 13 2019 *)
  • PARI
    my(x='x+O('x^60)); concat([0], Vec(x*(1 +24*x +51*x^2 +24*x^3)/((1-x)*(1-x^4)))) \\ G. C. Greubel, Sep 13 2019
    
  • Sage
    [n for n in (0..1250) if mod(n,100)==mod(n^2,100)] # G. C. Greubel, Sep 13 2019
    

Formula

a(4n)=100*n, a(4n+1)=100*n+1, a(4n+2)=100*n+25, a(4n+3)=100*n+76. - Franklin T. Adams-Watters, Mar 13 2006
From G. C. Greubel, Sep 13 2019: (Start)
a(n) = a(n-1) + a(n-4) - a(n-5).
G.f.: x*(1 +24*x +51*x^2 +24*x^3)/((1-x)*(1-x^4)). (End)