login
A182577
Number of ones in Zeckendorf representation of n!
3
1, 1, 1, 2, 2, 4, 3, 5, 6, 9, 8, 11, 11, 11, 16, 17, 17, 18, 23, 23, 28, 31, 33, 27, 33, 29, 40, 37, 42, 42, 41, 44, 47, 44, 53, 56, 57, 50, 64, 55, 59, 68, 63, 72, 70, 61, 69, 85, 80, 83, 87, 97, 98, 101, 87, 91, 100, 102, 114, 108, 116, 109, 117, 117, 113, 124
OFFSET
0,4
EXAMPLE
5! = {1, 0, 0, 1, 0, 1, 0, 0, 1, 0} in the Zeckendorf base.
PROG
(Python)
from math import factorial
def A182577(n):
m, tlist, s = factorial(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 15 2018
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, May 05 2012
STATUS
approved