shaneallgeier / egyptian-fraction-generator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Egyptian Fraction Generator

A small script that generates Egyptian fraction solutions for the Erdős–Straus conjecture using Dr. Ian Stewart's Short Sequence method of brute-forcing to find solutions.

Usage

Assuming you're trying to find solutions for n given 4/n = 1/x + 1/y + 1/z:

$python egyptian_fractions.py <n>

Will print out solutions for your 4/n.

Example

$python egyptian_fractions.py 9
Finding x,y,z for 9
1/3 1/10 1/90
1/3 1/12 1/36
1/4 1/6 1/36
1/4 1/9 1/12

Time taken: 0:00:00.002382

About

License:MIT License


Languages

Language:Python 100.0%