

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
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,4


COMMENTS

Rows converge towards A219648 (reversed).
See A014417 for the Fibonacci number system representation, also known as Zeckendorf expansion.


LINKS

A. Karttunen, Rows 0..233, flattened


PROG

(Scheme with Antti Karttunen's Intseqlibrary):
(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 (composefuns A219647 1+ (LEASTGTEI 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
Adjacent sequences: A219646 A219647 A219648 * A219650 A219651 A219652


KEYWORD

nonn,tabf


AUTHOR

Antti Karttunen, Nov 24 2012


STATUS

approved



