OFFSET
0,4
LINKS
Chai Wah Wu, Table of n, a(n) for n = 0..10000
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
CROSSREFS
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, May 05 2012
STATUS
approved