Zeckendorf Representation Calculator

Number

Zeckendorf representation3 + 8 + 89
Number of summands3
Largest summand89
Next Fibonacci number above n144
How this was calculated
  1. The Zeckendorf representation writes n as a sum of non-consecutive Fibonacci numbers, using the sequence 1, 2, 3, 5, 8, 13 and so on (each term the sum of the two before it).
  2. The greedy algorithm takes the largest Fibonacci number not exceeding the remainder each time: it starts with 89 for 100 and works down.
  3. The summands are 3 + 8 + 89 - no two are neighbours in the Fibonacci sequence, which is exactly what makes the representation unique.
  4. In total 100 is written with 3 summands, and the next Fibonacci number above it is 144.

The Zeckendorf Representation Calculator turns any positive integer into its unique sum of non-consecutive Fibonacci numbers. Zeckendorf's theorem states that every positive integer has exactly one such representation, using the sequence 1, 2, 3, 5, 8, 13 and so on. Enter a number and the calculator returns the Fibonacci numbers that add up to it, with no two of them adjacent in the sequence. For example, 100 = 89 + 8 + 3, a sum of 3 non-consecutive Fibonacci numbers, and the next Fibonacci number above 100 is 144. Similarly, 50 = 34 + 13 + 3, and 2024 = 1,597 + 377 + 34 + 13 + 3, using 5 summands.

The method behind the answer is the greedy algorithm: always take the largest Fibonacci number not exceeding the remainder, then repeat on what is left. This procedure always produces the Zeckendorf representation, which is why it is the accepted standard for this kind of calculation rather than an approximation or a shortcut. On this page you can see the formula, the step-by-step workings for each result, worked examples such as 100, 50 and 2024, and the sources behind the method, so you can check every step yourself.

Worked examples

100 as a sum of non-consecutive Fibonacci numbers

(100)

Zeckendorf representation3 + 8 + 89
Number of summands3
Largest summand89
Next Fibonacci number above n144

2024 in Zeckendorf form

(2024)

Zeckendorf representation3 + 13 + 34 + 377 + 1,597
Number of summands5
Largest summand1,597
Next Fibonacci number above n2,584

50 in Zeckendorf form

(50)

Zeckendorf representation3 + 13 + 34
Number of summands3
Largest summand34
Next Fibonacci number above n55

What is the Zeckendorf representation?

Zeckendorf's theorem states that every positive integer has a unique representation as a sum of non-consecutive Fibonacci numbers, drawn from the sequence 1, 2, 3, 5, 8, 13 and so on. Two details in that sentence do most of the work. First, the sequence starts 1, 2, 3, 5, 8 rather than the familiar 1, 1, 2, 3, 5, 8. Dropping the duplicated 1 matters: if both 1s were allowed, small numbers could be written in more than one way, and the guarantee of uniqueness would fail before it began. Second, the chosen Fibonacci numbers must not be consecutive in the sequence. A Zeckendorf representation calculator applies both rules every time, which is why its output is not just one valid answer among many but the only one.

Why do non-consecutive summands make the representation unique? The reason is that consecutive Fibonacci numbers can always be merged into a single later term. Because each Fibonacci number equals the sum of the two before it, any pair of neighbors in the sequence collapses into the next number up. Allowing neighbors would therefore open up alternative spellings of the same total, and the representation would stop being unique. Forbidding them closes off that route. Once no two summands sit next to each other in the sequence, there is only one way to build any given positive integer, which is exactly what Zeckendorf's theorem promises.

The greedy algorithm is the practical way to find that representation: always take the largest Fibonacci number not exceeding the remainder, subtract it, and repeat on what is left. This procedure always produces the Zeckendorf representation, never a near miss. A few worked examples show the pattern. 50 = 34 + 13 + 3, three summands with gaps between them in the sequence. 100 = 89 + 8 + 3, also three non-consecutive Fibonacci numbers, and the next Fibonacci number above 100 is 144, so 89 is the correct starting point. A larger case: 2024 = 1,597 + 377 + 34 + 13 + 3, using 5 summands, with no two of them adjacent in the sequence.

These examples illustrate a useful property of the representation: the number of summands stays small even as the input grows, because the Fibonacci numbers themselves grow quickly. The largest summand is always the biggest Fibonacci number that does not exceed the original number, and each subsequent term is smaller than the one before it. Reading the summands from largest to smallest gives a compact fingerprint of the number, and because the representation is unique, that fingerprint can be used to identify the number without ambiguity.

If you want to see the process on your own input, a Zeckendorf representation calculator carries out the greedy steps for you and lists the summands in order. The underlying rule is simple enough to check by hand: start with the largest Fibonacci number that fits, subtract, and keep going until nothing remains, making sure no two chosen terms are consecutive.

Key convention: the sequence begins 1, 2, 3, 5, 8, 13 — not 1, 1, 2, 3, 5. The single 1 and the ban on consecutive summands together guarantee that each positive integer has exactly one Zeckendorf representation.

Worked examples

The greedy algorithm is the simplest way to find a Zeckendorf representation: at each step, take the largest Fibonacci number that does not exceed what is left, subtract it, and repeat until nothing remains. Because the largest usable Fibonacci number is always taken, the terms you pick can never be consecutive, and the process always ends in the unique representation promised by Zeckendorf's theorem. The three examples below show the remainder shrinking at every step, which is what makes this a useful sanity check for any Zeckendorf representation calculator.

Start with 100. The largest Fibonacci number not exceeding 100 is 89, the next one above being 144. Subtracting gives a remainder of 11. The largest Fibonacci number not exceeding 11 is 8, leaving 3. The largest Fibonacci number not exceeding 3 is 3 itself, leaving 0. So 100 = 89 + 8 + 3, a sum of 3 non-consecutive Fibonacci numbers. Notice that 8 and 3 are separated by 5, and 89 and 8 are separated by 13, so no two chosen terms sit next to each other in the sequence 1, 2, 3, 5, 8, 13 and so on.

Now take 2024. The largest Fibonacci number not exceeding 2024 is 1,597, leaving 427. The largest Fibonacci number not exceeding 427 is 377, leaving 50. The largest Fibonacci number not exceeding 50 is 34, leaving 16. The largest Fibonacci number not exceeding 16 is 13, leaving 3. The largest Fibonacci number not exceeding 3 is 3, leaving 0. That gives 2024 = 1,597 + 377 + 34 + 13 + 3, using 5 summands. Each subtraction drops the remainder sharply, and the chosen terms are again non-consecutive.

Finally, 50. The largest Fibonacci number not exceeding 50 is 34, leaving 16. The largest Fibonacci number not exceeding 16 is 13, leaving 3. The largest Fibonacci number not exceeding 3 is 3, leaving 0. So 50 = 34 + 13 + 3. The same three-step pattern appears in all three examples: pick the biggest Fibonacci number that fits, subtract, and continue on the smaller remainder until it reaches zero.

The table below collects the runs so you can compare them side by side.

NumberZeckendorf representationNumber of summands
10089 + 8 + 33
20241,597 + 377 + 34 + 13 + 35
5034 + 13 + 33
In every example the remainder shrinks at each step, and the Fibonacci numbers chosen are never consecutive — exactly what Zeckendorf's theorem guarantees.

Why the greedy algorithm works

The greedy algorithm is the engine behind any Zeckendorf representation calculator, and the reason it always succeeds comes down to one property of the Fibonacci sequence: each term is smaller than the sum of all the terms before it, but larger than the term immediately before it. When you take the largest Fibonacci number that does not exceed your remainder, the leftover is guaranteed to be smaller than the Fibonacci number you just used. That leftover is also smaller than the previous Fibonacci number in the sequence, which is exactly what keeps two consecutive summands from ever appearing.

Walk through 100 to see the mechanism. The largest Fibonacci number not exceeding 100 is 89, so you take it and the remainder is 11. Because 11 is smaller than 89, and in fact smaller than the previous Fibonacci number, 55, the next pick cannot be 55 or anything near it. The largest Fibonacci number not exceeding 11 is 8, leaving 3, and 3 is itself a Fibonacci number. The result is 100 = 89 + 8 + 3, a sum of 3 non-consecutive Fibonacci numbers. Notice that the next Fibonacci number above 100 is 144, so 89 was the only sensible starting point, and the remainders shrank fast enough that no adjacent pair could sneak in.

The same pattern holds for larger inputs. For 2024, the greedy algorithm produces 2024 = 1,597 + 377 + 34 + 13 + 3, using 5 summands. Each remainder after a subtraction is smaller than the Fibonacci number just removed, so the following choice is always drawn from lower in the sequence, skipping at least one term. For 50, the process gives 50 = 34 + 13 + 3, again with no two consecutive Fibonacci numbers. A Zeckendorf representation calculator simply automates this repeated step: find the largest Fibonacci number not exceeding the remainder, subtract it, and repeat until nothing is left.

Why does the no-consecutive rule matter so much? Zeckendorf's theorem states that every positive integer has a unique representation as a sum of non-consecutive Fibonacci numbers, using the sequence 1, 2, 3, 5, 8, 13 and so on. The greedy algorithm always produces the Zeckendorf representation, and the remainder argument explains why: taking the largest possible Fibonacci number can never force two consecutive summands, because the remainder is always smaller than the previous Fibonacci number. That single fact is what makes the greedy approach reliable rather than merely convenient.

The greedy rule: always take the largest Fibonacci number not exceeding the remainder. The leftover is always smaller than the previous Fibonacci number, so consecutive summands can never occur.

Where Zeckendorf representations are used

The Zeckendorf numeral system is the name for the number system built on Zeckendorf's theorem: every positive integer has a unique representation as a sum of non-consecutive Fibonacci numbers, using the sequence 1, 2, 3, 5, 8, 13 and so on. Because that representation is unique, a Zeckendorf representation calculator can be used to produce a canonical form for any positive integer — a single, standard answer rather than one of several possible sums. Two examples show the pattern. 100 = 89 + 8 + 3, a sum of 3 non-consecutive Fibonacci numbers, and the next Fibonacci number above 100 is 144. And 2024 = 1,597 + 377 + 34 + 13 + 3, using 5 summands. In each case no two of the Fibonacci numbers chosen sit next to each other in the sequence, which is exactly what the theorem requires.

One practical use is Fibonacci coding in data compression. Because a Zeckendorf representation is unique and uses only non-consecutive Fibonacci numbers, it gives a well-defined way to encode an integer as a string of bits tied to the Fibonacci sequence. The uniqueness matters: an encoder and a decoder can agree on one representation for each number, so the encoded form does not need extra information to say which sum was meant. The representation also grows in a structured way as numbers get larger — compare 50 = 34 + 13 + 3 with the five-summand representation of 2024 — which is the kind of regularity coding schemes are built to exploit.

The same representation connects to the Wythoff game, a two-pile take-away game whose losing positions are tied to the Fibonacci numbers and to the golden ratio. The link runs through the structure of Zeckendorf representations: the way a number decomposes into non-consecutive Fibonacci numbers reflects where it falls relative to those special positions. Readers who meet the Wythoff game in combinatorial game theory will often see Zeckendorf representations used as a bookkeeping tool for describing those positions.

A useful property for anyone checking results by hand is that the greedy algorithm — always take the largest Fibonacci number not exceeding the remainder — always produces the Zeckendorf representation. That means you can verify any output from a Zeckendorf representation calculator with nothing more than repeated subtraction. Starting from 100, the largest Fibonacci number not exceeding it is 89, leaving 11; the largest not exceeding 11 is 8, leaving 3; and 3 is itself a Fibonacci number, giving 89 + 8 + 3. The same procedure reproduces 50 = 34 + 13 + 3 and the five-summand form of 2024, so the greedy method and the calculator should always agree.

Every positive integer has exactly one Zeckendorf representation, and the greedy algorithm — repeatedly taking the largest Fibonacci number that fits — always finds it.

FAQs

What is the Zeckendorf representation of 100?

The Zeckendorf representation of 100 is 89 + 8 + 3. That is three Fibonacci numbers, and none of them are consecutive in the Fibonacci sequence. Zeckendorf's theorem guarantees that every positive whole number has exactly one such representation using non-consecutive Fibonacci numbers, so this breakdown of 100 is unique.

What is the Zeckendorf representation of 2024?

The Zeckendorf representation of 2024 is 1,597 + 377 + 34 + 13 + 3. That is five Fibonacci numbers, and no two of them are consecutive in the Fibonacci sequence. Because the summands are non-consecutive, this breakdown of 2024 is the only one possible under Zeckendorf's theorem.

Why can't the summands be consecutive Fibonacci numbers?

Because two consecutive Fibonacci numbers add to the next one, so any consecutive pair could be merged. For example, a pair like 8 and 13 would combine into 21. If merging were allowed, a number could be written in more than one way, and the representation would not be unique. Requiring non-consecutive summands keeps it unique.

How do you find the Zeckendorf representation?

Greedily: repeatedly subtract the largest Fibonacci number that does not exceed what is left. Take 100: the largest Fibonacci number not over 100 is 89, leaving 11. The largest not over 11 is 8, leaving 3, which is itself a Fibonacci number. The result is 89 + 8 + 3.

Which Fibonacci sequence does Zeckendorf use?

Zeckendorf uses the sequence 1, 2, 3, 5, 8, 13, ... - starting with a single 1, so each value appears once. The standard Fibonacci sequence begins 1, 1, 2, 3, 5, and the repeated 1 would make the representation ambiguous. Dropping the duplicate 1 gives each value exactly once and keeps the representation unique.

What is the Zeckendorf representation of 50?

The Zeckendorf representation of 50 is 34 + 13 + 3. The largest Fibonacci number not exceeding 50 is 34, leaving 16. The largest not over 16 is 13, leaving 3, which is itself a Fibonacci number. The three summands are non-consecutive, so this is the unique Zeckendorf representation of 50.

Sources

Related calculators

Fibonacci Calculator
The nth Fibonacci number, computed exactly with arbitrary-precision arithmetic — plus the next term, the sum of the first n terms, and how close the ratio has come to the golden ratio.
Lucas Number Calculator
The nth Lucas number by its recurrence, with the companion Fibonacci number, the identity check L(n) = F(n-1) + F(n+1) and the ratio that converges to the square root of five.
Pell Equation Calculator
Find the minimal solution of x^2 - D y^2 = 1 with exact integer arithmetic: the continued fraction period of sqrt(D), the convergent that gives the fundamental solution, and a substitution check.