Problem 47058. Determine the Zeckendorf expansion of a number
The Goldbach conjecture deals with expressing integers as sums of primes. One might also seek to express integers as sums of other numbers, such as the Fibonacci numbers, which begin 0, 1, 1, 2, 3, 5, 8, 13, 21... For example, 26 can be written as 13+8+5 or 21+3+2. Zeckendorf (and Lekkerkerker before him) showed that every positive integer can be uniquely expressed as the sum of non-consecutive Fibonacci numbers. The Zeckendorf expansion for 26 is 21+5.
Write a function to determine the Zeckendorf expansion of the input number. In particular, output in decreasing order the Fibonacci numbers to be used in the sum.
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers14
Suggested Problems
-
Numbers with prime factors 2, 3 and 5.
469 Solvers
-
Getting the indices from a vector
9692 Solvers
-
Implement simple rotation cypher
1055 Solvers
-
4574 Solvers
-
Test Problem; Create a 5x5 array containing all ones
382 Solvers
More from this Author275
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!