This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A035516 Triangular array formed from Zeckendorf expansion of integers: repeatedly subtract the largest Fibonacci number you can until nothing remains. 13

%I

%S 0,1,2,3,3,1,5,5,1,5,2,8,8,1,8,2,8,3,8,3,1,13,13,1,13,2,13,3,13,3,1,

%T 13,5,13,5,1,13,5,2,21,21,1,21,2,21,3,21,3,1,21,5,21,5,1,21,5,2,21,8,

%U 21,8,1,21,8,2,21,8,3,21,8,3,1,34,34,1,34,2,34,3,34,3,1,34,5,34,5,1,34,5,2

%N Triangular array formed from Zeckendorf expansion of integers: repeatedly subtract the largest Fibonacci number you can until nothing remains.

%C Row n has A007895(n) terms.

%D Zeckendorf, E., Representation des nombres naturels par une somme des nombres de Fibonacci ou de nombres de Lucas, Bull. Soc. Roy. Sci. Liege 41, 179-182, 1972.

%H T. D. Noe, <a href="/A035516/b035516.txt">Rows n=0..1000 of triangle, flattened</a>

%H N. J. A. Sloane, <a href="/classic.html#WYTH">Classic Sequences</a>

%e 16 = 13 + 3.

%e 0; 1; 2; 3; 3,1; 5; 5,1; 5,2; 8; 8,1; 8,2; ...

%o a035516 n k = a035516_tabf !! n !! k

%o a035516_tabf = map a035516_row [0..]

%o a035516_row 0 = [0]

%o a035516_row n = z n \$ reverse \$ takeWhile (<= n) a000045_list where

%o z 0 _ = []

%o z x (f:fs'@(_:fs)) = if f <= x then f : z (x - f) fs else z x fs'

%o -- _Reinhard Zumkeller_, Mar 10 2013

%Y Cf. A035517, A035514, A035515.

%Y Cf. A000045.

%K nonn,easy,tabf

%O 0,3

%A _N. J. A. Sloane_.

%E More terms from _James A. Sellers_, Dec 13 1999

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .