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

%I #28 Sep 08 2022 08:44:36

%S 0,1,24,25,49,51,75,76,99,100,101,124,125,149,151,175,176,199,200,201,

%T 224,225,249,251,275,276,299,300,301,324,325,349,351,375,376,399,400,

%U 401,424,425,449,451,475,476,499,500,501,524,525,549,551,575,576,599

%N Numbers n such that n^3 and n have same last 2 digits.

%C The first two terms are included by assuming a leading zero digit. - _Harvey P. Dale_, Sep 07 2013

%C n such that n == 0, 1, or 24 (mod 25) and n == 0, 1 or 3 (mod 4). - _Robert Israel_, Nov 30 2015

%D 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.

%H Colin Barker, <a href="/A008856/b008856.txt">Table of n, a(n) for n = 1..1000</a>

%H <a href="/index/Rec#order_10">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,0,0,0,0,0,1,-1).

%F 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

%F From _Colin Barker_, Nov 30 2015: (Start)

%F a(n) = a(n-1)+a(n-9)-a(n-10) for n>10.

%F 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)

%p for n to 1000 do if n^3 - n mod 100 = 0 then print(n); fi; od;

%t Join[{0,1},Select[Range[10,600],Take[IntegerDigits[#],-2] == Take[ IntegerDigits[ #^3],-2]&]] (* _Harvey P. Dale_, Sep 07 2013 *)

%t 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 *)

%o (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

%o (Magma) [n: n in [0..600] | (n^3 - n) mod 100 eq 0]; // _Vincenzo Librandi_, Dec 01 2015

%o (Sage)

%o def A008856_list(prec):

%o P.<x> = PowerSeriesRing(ZZ, prec)

%o 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()

%o A008856_list(60) # _G. C. Greubel_, Sep 13 2019

%o (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

%Y Cf. A000578, A001477

%K nonn,easy,base

%O 1,3

%A _N. J. A. Sloane_