Differences between revisions 9 and 10
 ⇤ ← Revision 9 as of 2007-09-05 21:50:25 → Size: 1023 Editor: RogerHui Comment: ← Revision 10 as of 2008-12-08 10:45:34 → ⇥ Size: 1002 Editor: anonymous Comment: converted to 1.6 markup Deletions are marked like this. Additions are marked like this. Line 40: Line 40: [[BR]] <
> Line 44: Line 44: * [http://mathworld.wolfram.com/EgyptianFraction.html MathWorld] * [:Puzzles/Unit Fraction Sum:Unit Fraction Sum] * [[MathWorld:EgyptianFraction|MathWorld]] * [[Puzzles/Unit Fraction Sum|Unit Fraction Sum]] Line 47: Line 47: [[BR]] <
>

An Egyptian fraction is a sum of distinct unit fractions, reciprocals of positive integers. An Egyptian fraction of x where (0<x)*.x<:1 can be computed using a greedy algorithm discovered by Leonardo Pisano Fibonacci in 1202:

```ef=: 3 : 'if. (=<.) %y do. y else. y (] , ef@-) %1+<.%y end.'

ef 19r20
1r2 1r3 1r9 1r180
+/ ef 19r20
19r20```

ef can produce some large numbers:

```   v=: ef 11r199
+/ v
11r199
# v
11
5{. v
1r19 1r379 1r159223 1r28520799973 1r929641178371338400861
#@":"0 % v
2 3 6 11 21 43 85 169 337 674 1348```

That is, the last denominator in v has 1348 decimal digits. In contrast, another Egyptian fraction for 11r199 is:

```   +/ 1r20 1r199 1r3980
11r199```