login
Final 2 digits of 9^n.
2

%I #30 Jun 25 2023 01:46:23

%S 1,9,81,29,61,49,41,69,21,89,1,9,81,29,61,49,41,69,21,89,1,9,81,29,61,

%T 49,41,69,21,89,1,9,81,29,61,49,41,69,21,89,1,9,81,29,61,49,41,69,21,

%U 89,1,9,81,29,61,49,41,69,21,89

%N Final 2 digits of 9^n.

%C Period is 10, i.e., a(n+10) = a(n). - _Martin Renner_, Jun 11 2020

%H Vincenzo Librandi, <a href="/A014393/b014393.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="/index/Fi#final">Index entries for sequences related to final digits of numbers</a>

%F a(n) = 9^n mod 100. - _Martin Renner_, Jun 11 2020

%p seq(9^n mod 100, n=0..80); # _Martin Renner_, Jun 11 2020

%t Flatten[Prepend[FromDigits[Take[IntegerDigits[#],-2]]&/@(9^Range[2,60]),{1,9}]] (* _Harvey P. Dale_, Jan 22 2011 *)

%t PowerMod[9, Range[0, 80], 100] (* _Vincenzo Librandi_, Aug 16 2016 *)

%o (Magma) [Modexp(9, n, 100): n in [0..110]]; // _Vincenzo Librandi_, Aug 16 2016

%o (PARI) a(n) = lift(Mod(9, 100)^n); \\ _Michel Marcus_, Aug 16 2016

%Y Cf. A001019 (9^n), A010690 (final digit of 9^n).

%K nonn,base,easy

%O 0,2

%A _N. J. A. Sloane_