proof that every positive integer has a Zeckendorf representation
Theorem. Every positive integer has a Zeckendorf representation as a sum of non-consecutive Fibonacci numbers
.
If an integer , where refers to a Fibonacci number, then and for all , where is an array of binary digits and is the index of the most significant digit.
Otherwise, we assign where is the largest Fibonacci number such that . Then . It is obvious that , because it can be safely assumed at this juncture that and are distinct, that and therefore . This proves that must be 1, but no more than that. If is a Fibonacci number, we can stop now, otherwise, we must again subtract the largest possible Fibonacci number, decrement accordingly and set the appropriate . The farthest this iterative process can go is to , corresponding to .
Furthermore, the 1s in must have 0s in between them because any two consecutive 1s, such as at, say, and would indicate a failure to recognize that , and thus and can be set to zero in favor of setting to 1. (As a side note, no binary representation of a Mersenne number should be mistaken for a Zeckendorf representation; in other words, there are no repunits in Zeckendorf representations).