The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A373098 Last digit of n*2^n. 2

%I #47 Jul 06 2024 21:13:24

%S 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,

%T 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,

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

%N Last digit of n*2^n.

%C Periodic with period 20: [0,2,8,4,4,0,4,6,8,8,0,8,2,6,6,0,6,4,2,2].

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

%F a(n) = A010879(A036289(n)).

%F a(n) = A373099(n) - 1.

%F a(n) = A373100(n) + 1 (n >= 1).

%F a(n) = 0 if n mod 5 = 0,

%F 2 if n mod 20 = {1, 12, 18, 19},

%F 8 if n mod 20 = {2, 8, 9, 11},

%F 4 if n mod 20 = {3, 4, 6, 17},

%F 6 if n mod 20 = {7, 13, 14, 16}.

%p a:= n-> n*2&^n mod 10:

%p seq(a(n), n=0..100);

%t a[n_] := Mod[n*2^n, 10]

%o (Python)

%o def a(n):

%o return (n * 2**n) % 10

%o (PARI) a(n,b=10) = lift(n*Mod(2,b)^n) \\ _Hugo Pfoertner_, May 24 2024

%Y Cf. A010879, A036289.

%Y Cf. A373099, A373100.

%K nonn,base,easy

%O 0,2

%A _Javier Rodríguez Ríos_, May 23 2024

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 14 06:54 EDT 2024. Contains 375920 sequences. (Running on oeis4.)