OFFSET
1,3
COMMENTS
a(2^k) = 1.
In base B representation of A, modlg(A,B) is the most significant digit:
A = C0 + C1*B + C2*B^2 + ... + Cn*B^n, Cn = modlg(A,B), C0 = A mod B.
EXAMPLE
a(5) = modlg(5^5, 2^5) = floor(3125 / 32^floor(log32(3125))) = floor(3125/32^2) = 3.
a(7) = modlg(7^7, 2^7) = floor(823543 / 128^floor(log128(823543))) = floor(823543/128^2) = 50.
PROG
(Python)
import math
def modiv(a, b):
return a - b*int(a/b)
def modlg(a, b):
return a // b**int(math.log(a, b))
for n in range(1, 77):
print modlg(n**n, 2**n),
CROSSREFS
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, Aug 29 2012
STATUS
approved