Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

egyptian_methods

Egyptian Fractions - Specialized Methods


Description

Generate Egyptian fractions with specialized methods.

Usage

egyptian_methods(a, b)

Arguments

a, b

integers, a != 1, a < b and a, b relatively prime.

Details

For a rational number 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:

  • ‘greedy’

  • Fibonacci-Sylvester

  • Golomb (same as with Farey sequences)

  • continued fractions (not yet implemented)

Value

No return value, all solutions found will be printed to the console.

References

See Also

Examples

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

numbers

Number-Theoretic Functions

v0.8-1
GPL (>= 3)
Authors
Hans Werner Borchers
Initial release
2021-04-11

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.