OFFSET
1,9
COMMENTS
If 2 <= n <= 7, n^n has fewer than n digits, so a(n) is taken to be 0.
a(n) = 0 if n is divisible by 10.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
8^8 = 16777216 so a(8) = 1.
MAPLE
seq(10^(1-m)*((m &^m mod 10^m) - (m &^ m mod 10^(m-1))), m=1..1000);
PROG
(Python)
def a(n): return pow(n, n, 10**n)//10**(n-1)
print([a(n) for n in range(1, 101)]) # Michael S. Branicky, Jun 21 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Robert Israel, Jan 19 2017
STATUS
approved