Zeckendorf's theorem, named after Belgian mathematician Edouard Zeckendorf, is a theorem about the representation of integers as sums of Fibonacci numbers.
Zeckendorf's theorem states that every positive integer can be represented in a unique way as the sum of "one or more" distinct Fibonacci numbers in such a way that the sum does not include any two consecutive Fibonacci numbers. More precisely, if "N" is any positive integer, there exist positive integers "c""i" ≥ 2, with "c""i" + 1 > "c""i" + 1, such that
: where "F""n" is the "n"th Fibonacci number. Such a sum is called the Zeckendorf representation of "N".
For example, the Zeckendorf representation of 100 is
:100 = 89 + 8 + 3
There are other ways of representing 100 as the sum of Fibonacci numbers - for example
:100 = 89 + 8 + 2 + 1:100 = 55 + 34 + 8 + 3
but these are not Zeckendorf representations because 1 and 2 are consecutive Fibonacci numbers, as are 34 and 55.
For any given positive integer, a representation that satisfies the conditions of Zeckendorf's theorem can be found by using a greedy algorithm, choosing the largest possible Fibonacci number at each stage.
Proof of Zeckendorf's theorem
Zeckendorf's theorem has two parts:
#Existence: every positive integer "n" has a Zeckendorf representation.
#Uniqueness: no positive integer "n" has two different Zeckendorf representations.
The first part of Zeckendorf's theorem (existence) can be proved by induction. For "n" = 1, 2, 3 it is clearly true, for "n" = 4 we have 4 = 3 + 1.Now let each have a Zeckendorf's representation. If "k" + 1 is a Fibonacci number then we're done, else there exists "j" such that