login
A373098
Last digit of n*2^n.
2
0, 2, 8, 4, 4, 0, 4, 6, 8, 8, 0, 8, 2, 6, 6, 0, 6, 4, 2, 2, 0, 2, 8, 4, 4, 0, 4, 6, 8, 8, 0, 8, 2, 6, 6, 0, 6, 4, 2, 2, 0, 2, 8, 4, 4, 0, 4, 6, 8, 8, 0, 8, 2, 6, 6, 0, 6, 4, 2, 2, 0, 2, 8, 4, 4, 0, 4, 6, 8, 8, 0, 8, 2, 6, 6, 0, 6, 4, 2, 2, 0, 2, 8, 4, 4, 0, 4, 6, 8, 8, 0, 8, 2, 6, 6, 0, 6, 4, 2, 2
OFFSET
0,2
COMMENTS
Periodic with period 20: [0,2,8,4,4,0,4,6,8,8,0,8,2,6,6,0,6,4,2,2].
FORMULA
a(n) = A010879(A036289(n)).
a(n) = A373099(n) - 1.
a(n) = A373100(n) + 1 (n >= 1).
a(n) = 0 if n mod 5 = 0,
2 if n mod 20 = {1, 12, 18, 19},
8 if n mod 20 = {2, 8, 9, 11},
4 if n mod 20 = {3, 4, 6, 17},
6 if n mod 20 = {7, 13, 14, 16}.
MAPLE
a:= n-> n*2&^n mod 10:
seq(a(n), n=0..100);
MATHEMATICA
a[n_] := Mod[n*2^n, 10]
PROG
(Python)
def a(n):
return (n * 2**n) % 10
(PARI) a(n, b=10) = lift(n*Mod(2, b)^n) \\ Hugo Pfoertner, May 24 2024
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
STATUS
approved