|
|
A219641
|
|
a(n) = n minus (number of 1's in Zeckendorf expansion of n).
|
|
14
|
|
|
0, 0, 1, 2, 2, 4, 4, 5, 7, 7, 8, 9, 9, 12, 12, 13, 14, 14, 16, 16, 17, 20, 20, 21, 22, 22, 24, 24, 25, 27, 27, 28, 29, 29, 33, 33, 34, 35, 35, 37, 37, 38, 40, 40, 41, 42, 42, 45, 45, 46, 47, 47, 49, 49, 50, 54, 54, 55, 56, 56, 58, 58, 59, 61, 61, 62, 63, 63, 66
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,4
|
|
COMMENTS
|
See A014417 for the Fibonacci number system representation, also known as Zeckendorf expansion.
|
|
LINKS
|
Paul Baird-Smith, Alyssa Epstein, Kristen Flint, and Steven J. Miller, The Zeckendorf Game, arXiv:1809.04881 [math.NT], 2018.
|
|
FORMULA
|
|
|
MATHEMATICA
|
zeck = DigitCount[Select[Range[0, 500], BitAnd[#, 2*#] == 0&], 2, 1];
|
|
PROG
|
(Python)
from sympy import fibonacci
def a(n):
k=0
x=0
while n>0:
k=0
while fibonacci(k)<=n: k+=1
x+=10**(k - 3)
n-=fibonacci(k - 1)
return str(x).count("1")
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|