%I #26 Oct 19 2023 23:08:04
%S 0,1,8,1,4,5,6,1,8,1,0,1,2,9,4,5,6,9,2,1,0,1,8,1,4,5,6,1,8,1,0,1,2,9,
%T 4,5,6,9,2,1,0,1,8,1,4,5,6,1,8,1,0,1,2,9,4,5,6,9,2,1,0,1,8,1,4,5,6,1,
%U 8,1,0,1,2,9,4,5,6,9,2,1,0,1,8,1,4,5,6
%N Final digit (in decimal system) of n^(n+1) = A007778(n).
%C This is a periodic sequence (1, 8, 1, 4, 5, 6, 1, 8, 1, 0, 1, 2, 9, 4, 5, 6, 9, 2, 1, 0) with period 20 (which is twice the base).
%H <a href="/index/Rec#order_20">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1).
%F a(n) = n^(n+1) mod 10.
%F a(n) = A010879(A007778(n)).
%F a(n) = A365936(n+10).
%e For n = 3, a(3) = 3^4 mod 10 = 81 mod 10 = 1.
%t a[n_]:=Last[IntegerDigits[n^(n+1)]]; Array[a,87,0] (* _Stefano Spezia_, Sep 26 2023 *)
%o (PARI) a(n) = lift(Mod(n, 10)^(n+1)); \\ _Michel Marcus_, Sep 23 2023
%Y Cf. A007778, A010879, A056849, A120962, A365707.
%K nonn,base,easy
%O 0,3
%A _Marco RipĂ _, Sep 23 2023
|