OFFSET
0,4
COMMENTS
See A014417 for the Fibonacci number system representation, also known as Zeckendorf expansion.
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..10000
Paul Baird-Smith, Alyssa Epstein, Kristen Flint, and Steven J. Miller, The Zeckendorf Game, arXiv:1809.04881 [math.NT], 2018.
FORMULA
a(n) = n - A007895(n).
MATHEMATICA
zeck = DigitCount[Select[Range[0, 500], BitAnd[#, 2*#] == 0&], 2, 1];
Range[0, Length[zeck]-1] - zeck (* Jean-François Alcover, Jan 25 2018 *)
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")
print([n - a(n) for n in range(101)]) # Indranil Ghosh, Jun 09 2017
CROSSREFS
Cf. A007895, A014417. A022342 gives the positions of records, resulting the same sequence with duplicates removed: A219640. A035336 gives the positions of values that occur only once: A219639. Cf. also A219637, A219642. Analogous sequence for binary system: A011371, for factorial number system: A219651.
KEYWORD
nonn
AUTHOR
Antti Karttunen, Nov 24 2012
STATUS
approved