A168428 a(n) = 4^n mod 10.
1, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (0, 1).
Programs
-
Magma
[Modexp(4, n, 10): n in [0..100]]; // Vincenzo Librandi, Jul 23 2016
-
Mathematica
PowerMod[4, Range[0, 25], 10] (* G. C. Greubel, Jul 22 2016 *)
-
PARI
a(n)=lift(Mod(4,10)^n) \\ Charles R Greathouse IV, Mar 22 2016
-
Sage
[power_mod(4, n, 10)for n in range(0, 94)] #