login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A219649
Irregular table, where row n (n >= 0) starts with n, the next term is A219641(n), and the successive terms are obtained by repeatedly subtracting the number of 1's in the previous term's Zeckendorf expansion, until zero is reached, after which the next row starts with one larger n.
4
0, 1, 0, 2, 1, 0, 3, 2, 1, 0, 4, 2, 1, 0, 5, 4, 2, 1, 0, 6, 4, 2, 1, 0, 7, 5, 4, 2, 1, 0, 8, 7, 5, 4, 2, 1, 0, 9, 7, 5, 4, 2, 1, 0, 10, 8, 7, 5, 4, 2, 1, 0, 11, 9, 7, 5, 4, 2, 1, 0, 12, 9, 7, 5, 4, 2, 1, 0, 13, 12, 9, 7, 5, 4, 2, 1, 0, 14, 12, 9, 7, 5, 4, 2, 1, 0, 15
OFFSET
0,4
COMMENTS
Rows converge towards A219648 (reversed).
See A014417 for the Fibonacci number system representation, also known as Zeckendorf expansion.
LINKS
PROG
(Scheme with Antti Karttunen's Intseq-library):
(definec (A219649 n) (cond ((< n 2) n) ((not (zero? (A219649 (- n 1)))) (A219641 (A219649 (- n 1)))) (else (+ 1 (A219649 (+ 1 (Aux_for_219649 (- n 1))))))))
(define Aux_for_219649 (compose-funs A219647 -1+ (LEAST-GTE-I 0 0 A219647))) ;; Gives the position of previous zero.
CROSSREFS
Cf. A007895, A014417, A219641, A219647. Analogous sequence for binary system: A218254, for factorial number system: A219659.
Sequence in context: A112658 A190693 A257571 * A292160 A025581 A025669
KEYWORD
nonn,tabf
AUTHOR
Antti Karttunen, Nov 24 2012
STATUS
approved