Understanding the Egyptian fractions calculator — concept and principle
This calculator writes a fraction as a sum of different unit fractions (fractions with numerator 1), the way scribes in ancient Egypt did. It uses the greedy method, shows each step, and reports the number of terms, the largest denominator and the decimal value. Use it for history of mathematics, number puzzles and fraction practice.
How it is calculated
Greedy (Fibonacci–Sylvester) method, for a remaining fraction p/q:
- Take the largest unit fraction that fits: 1/⌈q ÷ p⌉.
- Subtract it and repeat with what is left, until the remainder is 0.
- Improper fractions are split into a whole-number part first.
- Exact whole-number arithmetic is used; ⌈ ⌉ means rounding up.
The principle
Every positive fraction can be written as a sum of distinct unit fractions. The greedy method always finishes because each step leaves a remainder with a smaller numerator: if p/q − 1/m = (pm − q)/(qm), then pm − q is less than p. The denominators can grow very fast, however; 5/121 needs a denominator with 25 digits. The greedy expansion is also not always the shortest possible one.
Worked example
Default inputs: 4/13.
- ⌈13 ÷ 4⌉ = 4: 4/13 − 1/4 = 3/52.
- ⌈52 ÷ 3⌉ = 18: 3/52 − 1/18 = 1/468.
- The remainder is already a unit fraction: 1/468 − 1/468 = 0.
- Egyptian fraction: 1/4 + 1/18 + 1/468, 3 unit fractions, largest denominator 468.
- Fraction in lowest terms 4/13, whole-number part 0, decimal 0.3076923077.
How to read the result
Check by adding with a common denominator: 1/4 + 1/18 + 1/468 = 117/468 + 26/468 + 1/468 = 144/468 = 4/13. Other expansions exist; for example 4/13 = 1/4 + 1/26 + 1/52 also works, with smaller denominators than the greedy answer.
Common mistakes
- Repeating the same unit fraction, which is not allowed in Egyptian fractions.
- Rounding q ÷ p down instead of up, which takes a unit fraction that is too big.
- Expecting the greedy result to be the shortest.
- Forgetting to reduce the fraction first.
Frequently asked questions
What is an Egyptian fraction?
A sum of different unit fractions, such as 3/4 = 1/2 + 1/4.
Can every fraction be written this way?
Yes, every positive fraction has at least one Egyptian fraction expansion.
Is the greedy method always best?
No; it always works, but other expansions can be shorter or have smaller denominators.
Sources: E. W. Weisstein, "Egyptian Fraction", Wolfram MathWorld