# Erdos Strauss

## 2792 days ago by bburkho

$Erd\ddot{o}s\ Straus\ Homework$

Brandon Burkholder

10/5/2014

The first function here looks at $\frac{4}{n}$ for each n up to the input integer x. It then attempts to break that function into as many triplets of unit fractions as possible in the form $\frac{4}{n} = \frac{1}{a} + \frac{1}{b} + \frac{1}{c}$ where $a \leq b \leq c$. This is done by first considering the stipulation $a \leq b \leq c$ such that we know the smallest $\frac{1}{a}$ can be is $\frac{1}{3}$ of the total sum of unit fractions. This sets an upper limit on what $a$ can be, because as the indexes get higher $\frac{1}{a}$ gets smaller until it reaches the smallest it can be at $a = \frac{3 \times n}{4}$. Then for each iteration that we try for $a$, we know that the smallest which $\frac{1}{b}$ can be is $\frac{1}{2}$ of what is remaining after we subtract the value $\frac{1}{a}$ from $\frac{4}{n}$. So once again we have an upper limit for what $b$ can be. We then use this nested loop to test subtract every combination of $\frac{1}{a} + \frac{1}{b}$ from $\frac{4}{n}$ and if this result is a unit fraction then we have found a sequence of three Egyptian fractions which satisfie the criteria of the conjecture.

def egypt(x): N=x count=0 sol = [0 for i in range(N)] for n in range(2,N): for a in range(1,round(3*n/4)+1): #1/a cant be smaller than 1/3 of 4/n if 4/n > 1/a: b_max=round(2/((4/n)-(1/a))) #1/b cant be smaller than 1/2 of (4/n)-(1/a) for b in range(1,b_max+1): if 1/a >= 1/b: c = (4/n) - (1/a) - (1/b) if c > 0 and floor(1/c) == 1/c and (1/b) >= (c): #we try all possible values of 1/a and 1/b and if when we subtract both of these values from 4/n the resultant reciprocal is a whole number then we have found the appropriate unit fraction #print("1/{} + 1/{} + {} = 4/{}".format(a,b,c,n)) count += 1 sol[n] = count print("When n = {} the number of solutions is: {}".format(n,count)) count = 0 print sol

Next we plot the number of solutions for each value of n up to 1000

list_plot(sol)

Now plotting only the prime values of n up to 1000 we can see that the  43rd and 52nd prime have relatively few solutions to the conjecture. These correspond to values of $n$ of 139 and 191 respectively. These numbers do not seem to have anything in common or hold any special significance, seemingly a consequence of the random nature of the number of solutions for a given $n$.

list_plot([sol[i] for i in list(primes(1,1000))])