How to use the egyptian fraction decomposer
- Enter the numerator and the denominator of the fraction as whole numbers. A numerator larger than the denominator is allowed.
- Read the whole part and the unit fractions, each with 1 on top, whose sum is the fraction.
- The table lists each term, with the number of digits in its denominator, since the terms can grow very large.
- Download the CSV to keep the full denominators, which can have dozens of digits.
Formula
reduce the fraction and split off the whole part
for a fraction a/b, take the largest unit fraction that fits: 1/ceil(b/a)
subtract it, reduce the rest, and repeat until nothing is left
check: the unit fractions add back to the fraction exactly
This is the greedy method of Fibonacci and Sylvester. It always ends, and it gives distinct unit fractions. It does not always give the shortest answer.
Four thirteenths and five over 121
4/13 takes the unit fraction 1/4 first, because 4 is the smallest denominator whose unit fraction fits. The rest is 4/13 - 1/4 = 3/52, which takes 1/18 and leaves 1/468. So 4/13 = 1/4 + 1/18 + 1/468. In the same way 2/7 = 1/4 + 1/28, 7/15 = 1/3 + 1/8 + 1/120 and 9/4 = 2 + 1/4.
The method can be hard on the digits. 5/121 needs five terms: 1/25 + 1/757 + 1/763,309 + 1/873,960,180,913 + a last denominator of 25 digits, 1,527,612,795,642,093,418,846,225. Every case in the tests was added back with exact fractions to confirm the sum.
Where Egyptian fractions come from
Ancient Egyptian scribes wrote most fractions as sums of different unit fractions, with a few special signs for others such as 2/3. The exercise is still used in math classes and in number theory. Questions such as whether the greedy method can be beaten for the shortest answer, or whether every fraction has an expansion with a given property, are open ones.
Related tools
To add fractions yourself and check the sum, use the Fraction Calculator. For another way to write a fraction, see the Continued Fraction Calculator and the Repeating Decimal to Fraction Converter.
More tools for playing with numbers
For more number patterns and conversions, try the Gray Code Converter, Digit Grouping Converter and Magic Square Generator.
Assumptions and limits
- The numerator is a whole number from 0 to 1 trillion and the denominator from 1 to 1 trillion.
- The fraction is reduced before it is expanded.
- The greedy method is used, and the result may not be the shortest possible.
- Very large denominators are shown shortened, with the number of digits, but kept in full in the CSV.
- The numerator and denominator in the form are examples to replace with your own.
Frequently asked questions
Why must the unit fractions be different?
The historical rule was that no unit fraction is repeated. Without that rule you could write any fraction as 1/b added many times, which says nothing interesting.
Is the answer unique?
No. A fraction usually has many expansions. The greedy method gives one of them. Some fractions have shorter ones, such as 5/6 = 1/2 + 1/3, which is also the greedy result, and others do not.
Why do some denominators have so many digits?
Each greedy step can square the denominator or more, so the numbers can grow very quickly. 5/121 is a classic example where the last denominator has 25 digits.
What happens with a numerator of zero?
Zero has no unit fractions in its sum, so the tool shows an empty sum with zero terms.