egyptian_methods(a, b)
0 < a/b < 1
, generates Egyptian fractions
that is finds integers x1, x2, ..., xk
such that a/b = 1/x1 + 1/x2 + ... + 1/xk
using the following methods:
egyptian_complete
egyptian_methods(8, 11)
# 8/11 = 1/2 + 1/5 + 1/37 + 1/4070 (Fibonacci-Sylvester)
# 8/11 = 1/2 + 1/6 + 1/21 + 1/77 (Golomb-Farey)
# Other solutions
# 8/11 = 1/2 + 1/8 + 1/11 + 1/88
# 8/11 = 1/2 + 1/12 + 1/22 + 1/121
Run the code above in your browser using DataLab