login
A182578
Number of ones in Zeckendorf representation of n^n.
1
1, 1, 2, 3, 3, 6, 3, 10, 13, 12, 16, 15, 20, 24, 20, 30, 25, 31, 26, 33, 33, 31, 34, 42, 49, 49, 53, 55, 56, 55, 58, 64, 64, 67, 73, 78, 70, 76, 77, 75, 89, 83, 92, 90, 106, 99, 100, 99, 107, 116, 107, 115, 125, 125, 122, 119, 127, 137, 127, 138, 155, 156, 153, 160
OFFSET
0,3
EXAMPLE
5^5 = {1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0} in the Zeckendorf base.
PROG
(Python)
def A182578(n):
m, tlist, s = n**n, [1, 2], 0
while tlist[-1]+tlist[-2] <= m:
tlist.append(tlist[-1]+tlist[-2])
for d in tlist[::-1]:
if d <= m:
s += 1
m -= d
return s # Chai Wah Wu, Jun 14 2018
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, May 05 2012
STATUS
approved