OFFSET
0,10
COMMENTS
a(n)=d(n) with n^n = Sum(d(k)*8^k: 0<=d(k)<8, k>=0).
LINKS
Robert Israel, Table of n, a(n) for n = 0..10000
Eric Weisstein's World of Mathematics, Octal
FORMULA
a(n) = floor(n^n / 8^n) mod 8.
EXAMPLE
n=9, 9^9=387420489 -> '2705710511', '2---------': a(9)=2;
a(0)=1, a(k)=0 for 0<k<8 and a(8)=1.
MAPLE
f:= proc(n) local x, L;
x:= n &^ n mod 8^(n+1);
floor(x/8^n)
end proc:
f(0):= 1:
map(f, [$0..101]); # Robert Israel, Sep 19 2019
PROG
(Magma) [Floor(n^n/8^n) mod 8:n in [0..101]]; // Marius A. Burtea, Sep 20 2019
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Sep 20 2003
STATUS
approved