%I #8 Nov 25 2012 23:52:33
%S 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,
%T 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,
%U 0,13,12,9,7,5,4,2,1,0,14,12,9,7,5,4,2,1,0,15
%N 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.
%C Rows converge towards A219648 (reversed).
%C See A014417 for the Fibonacci number system representation, also known as Zeckendorf expansion.
%H A. Karttunen, <a href="/A219649/b219649.txt">Rows 0..233, flattened</a>
%o (Scheme with _Antti Karttunen_'s Intseq-library):
%o (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))))))))
%o (define Aux_for_219649 (compose-funs A219647 -1+ (LEAST-GTE-I 0 0 A219647))) ;; Gives the position of previous zero.
%Y Cf. A007895, A014417, A219641, A219647. Analogous sequence for binary system: A218254, for factorial number system: A219659.
%K nonn,tabf
%O 0,4
%A _Antti Karttunen_, Nov 24 2012
|