OFFSET
1,1
COMMENTS
Number of different remainders mod 10 of n-th powers (i.e., number of possible last decimal digits of n-th powers).
Continued fraction expansion of (124+sqrt(16926))/25. - Klaus Brockhaus, May 01 2010
LINKS
Muniru A Asiru, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (0,0,0,1).
FORMULA
a(n) = 8 - 4*((n+1) mod 2) + 2*ceiling(n/4) - 2*floor(n/4). - Wesley Ivan Hurt, Mar 26 2014
a(n) = 15/2 - (5/2)*cos(n*Pi) - cos(n*Pi/2). - Wesley Ivan Hurt, Oct 05 2018
EXAMPLE
a(4) = 4 because the possible last decimal digits of 4th powers are 0, 1, 5, 6.
MAPLE
seq(op([10, 6, 10, 4]), n=0..30); # Wesley Ivan Hurt, Oct 06 2018
MATHEMATICA
PadRight[{}, 80, {10, 6, 10, 4}] (* Harvey P. Dale, Nov 29 2015 *)
PROG
(GAP) Flat(List([1..30], n->[10, 6, 10, 4])); # Muniru A Asiru, Oct 06 2018
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Franz Vrabec, Nov 14 2009
STATUS
approved