OFFSET
0,12
COMMENTS
a(n) = d(n) with n^n = Sum_{0<=d(k)<10, k>=0} d(k)*10^k.
LINKS
Robert Israel, Table of n, a(n) for n = 0..10000
Eric Weisstein's World of Mathematics, Decimal
FORMULA
a(n) = floor(n^n / 10^n) mod 10.
EXAMPLE
For n=16, 16^16 = 18446744073709551616, a(16)=4.
a(0)=1, a(k)=0 for 0 < k < 10 and a(10)=1.
MAPLE
f:= proc(n) local x, L;
x:= n &^ n mod 10^(n+1);
floor(x/10^n)
end proc:
f(0):= 1:
map(f, [$0..101]); # Robert Israel, Dec 02 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Sep 20 2003
STATUS
approved