login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A281298
a(n) is the n-th decimal digit from the right in n^n.
1
1, 0, 0, 0, 0, 0, 0, 1, 3, 0, 8, 9, 2, 1, 8, 6, 4, 4, 9, 0, 0, 7, 9, 8, 0, 0, 0, 3, 1, 0, 5, 1, 8, 1, 5, 7, 8, 2, 4, 0, 4, 1, 8, 7, 4, 0, 3, 8, 1, 0, 6, 1, 3, 8, 3, 4, 9, 3, 3, 0, 1, 1, 9, 6, 8, 2, 1, 6, 5, 0, 8, 6, 8, 5, 0, 7, 1, 1, 2, 0, 3, 8, 3, 3, 3, 8, 2, 5, 3, 0, 4, 1, 0, 6, 3, 5, 3, 2, 7, 0
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
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
Cf. A000312.
Sequence in context: A181977 A199659 A201584 * A373308 A095123 A019691
KEYWORD
nonn,base
AUTHOR
Robert Israel, Jan 19 2017
STATUS
approved