|
|
A116081
|
|
Final nonzero digit of n^n.
|
|
3
|
|
|
1, 4, 7, 6, 5, 6, 3, 6, 9, 1, 1, 6, 3, 6, 5, 6, 7, 4, 9, 6, 1, 4, 7, 6, 5, 6, 3, 6, 9, 9, 1, 6, 3, 6, 5, 6, 7, 4, 9, 6, 1, 4, 7, 6, 5, 6, 3, 6, 9, 5, 1, 6, 3, 6, 5, 6, 7, 4, 9, 6, 1, 4, 7, 6, 5, 6, 3, 6, 9, 9, 1, 6, 3, 6, 5, 6, 7, 4, 9, 6, 1, 4, 7, 6, 5, 6, 3, 6, 9, 1, 1, 6, 3, 6, 5, 6, 7, 4, 9, 1, 1, 4, 7, 6, 5
(list;
constant;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
The decimal number .147656369116... formed from these digits is a transcendental number; see Dresden's second article. These digits are never eventually periodic.
Digits appear with predictable frequencies: 1/10 for 3, 4, and 7; 1/9 for 5; 3/25 for 9; 28/225 for 1; and 307/900 for 6. - Charles R Greathouse IV, Oct 03 2022
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
a(4) = 6 because 4^4 (which is 256) ends in 6.
|
|
MAPLE
|
f:= proc(n) local d, m, p; d:= min(padic:-ordp(n, 2), padic:-ordp(n, 5));
m:= n/10^d;
p:= n - 1 mod 4 + 1;
m &^ p mod 10;
end proc:
|
|
MATHEMATICA
|
f[n_] := Block[{m = n}, While[ Mod[m, 10] == 0, m /= 10]; PowerMod[m, n, 10]]; Array[f, 105] (* Robert G. Wilson v, Mar 13 2006 and modified Oct 12 2014 *)
|
|
PROG
|
(PARI) f(n) = while(!(n % 10), n/=10); n % 10; \\ A065881
(Python)
def a(n):
k = n
while k%10 == 0: k //= 10
return pow(k, n, 10)
(Python)
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|