A008856 Numbers n such that n^3 and n have same last 2 digits.
0, 1, 24, 25, 49, 51, 75, 76, 99, 100, 101, 124, 125, 149, 151, 175, 176, 199, 200, 201, 224, 225, 249, 251, 275, 276, 299, 300, 301, 324, 325, 349, 351, 375, 376, 399, 400, 401, 424, 425, 449, 451, 475, 476, 499, 500, 501, 524, 525, 549, 551, 575, 576, 599
Offset: 1
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
- Colin Barker, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,0,0,0,1,-1).
Programs
-
GAP
a:=[0,1,24,25,49,51,75,76,99,100];; for n in [10..60] do a[n]:= a[n-1]+a[n-9]-a[n-10]; od; a; # G. C. Greubel, Sep 13 2019
-
Magma
[n: n in [0..600] | (n^3 - n) mod 100 eq 0]; // Vincenzo Librandi, Dec 01 2015
-
Maple
for n to 1000 do if n^3 - n mod 100 = 0 then print(n); fi; od;
-
Mathematica
Join[{0,1},Select[Range[10,600],Take[IntegerDigits[#],-2] == Take[ IntegerDigits[ #^3],-2]&]] (* Harvey P. Dale, Sep 07 2013 *) LinearRecurrence[{1,0,0,0,0,0,0,0,1,-1}, {0,1,24,25,49,51,75,76,99,100}, 60] (* G. C. Greubel, Nov 30 2015, modified Sep 13 2019 *)
-
PARI
concat(0, Vec(x^2*(1+23*x+x^2+24*x^3+2*x^4+24*x^5+x^6+23*x^7 +x^8)/((1-x)^2*(1+x+x^2)*(1+x^3+x^6)) + O(x^60))) \\ Colin Barker, Nov 30 2015
-
Sage
def A008856_list(prec): P.
= PowerSeriesRing(ZZ, prec) return P(x*(1+23*x+x^2+24*x^3+2*x^4+24*x^5+x^6+23*x^7+x^8)/((1-x)*(1-x^9))).list() A008856_list(60) # G. C. Greubel, Sep 13 2019
Formula
a(9n)=100*n, a(9n+1)=100*n+1, a(9n+2)=100*n+24, a(9n+3)=100*n+25, a(9n+4)=100*n+49, a(9n+5)=100*n+51, a(9n+6)=100*n+75, a(9n+7)=100*n+76, a(9n+8)=100*n+99. - Franklin T. Adams-Watters, Mar 13 2006
From Colin Barker, Nov 30 2015: (Start)
a(n) = a(n-1)+a(n-9)-a(n-10) for n>10.
G.f.: x^2*(1+23*x+x^2+24*x^3+2*x^4+24*x^5+x^6+23*x^7+x^8) / ((1-x)^2 * (1+x+x^2)*(1+x^3+x^6)). (End)
Comments