|
|
A008853
|
|
Numbers n such that n^2 and n have same last 3 digits.
|
|
2
|
|
|
0, 1, 376, 625, 1000, 1001, 1376, 1625, 2000, 2001, 2376, 2625, 3000, 3001, 3376, 3625, 4000, 4001, 4376, 4625, 5000, 5001, 5376, 5625, 6000, 6001, 6376, 6625, 7000, 7001, 7376, 7625, 8000, 8001, 8376, 8625, 9000, 9001, 9376, 9625, 10000
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
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.
|
|
LINKS
|
|
|
FORMULA
|
a(n) = a(n-1) + a(n-4) - a(n-5).
G.f.: x^2*(1 +375*x +249*x^2 +375*x^3)/((1-x)*(1-x^4)). (End)
|
|
MAPLE
|
for n to 10000 do if n^2 - n mod 1000 = 0 then print(n); fi; od;
|
|
MATHEMATICA
|
LinearRecurrence[{1, 0, 0, 1, -1}, {0, 1, 376, 625, 1000}, 60] (* G. C. Greubel, Sep 13 2019 *)
|
|
PROG
|
(PARI) my(x='x+O('x^60)); concat([0], Vec(x*(1 +375*x +249*x^2 +375*x^3)/((1-x)*(1-x^4)))) \\ G. C. Greubel, Sep 13 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 60); [0] cat Coefficients(R!( x*(1 +375*x +249*x^2 +375*x^3)/((1-x)*(1-x^4)) )); // G. C. Greubel, Sep 13 2019
(Sage) [n for n in (0..1250) if mod(n, 1000)==mod(n^2, 1000)] # G. C. Greubel, Sep 13 2019
(GAP) a:=[0, 1, 376, 625, 1000];; 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
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|