All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Odd Egyptians (Posted on 2017-06-21) Difficulty: 3 of 5
Find all ways of expressing 1 as the sum of nine distinct odd Egyptian Fractions.

I.e. reciprocals of odd whole numbers.

No Solution Yet Submitted by Jer    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Programming exercise (spoiler); 20/20 hindsight | Comment 1 of 2
The program finds

1/3 + 1/5 + 1/7 + 1/9 + 1/11 + 1/15 + 1/21 + 1/135 + 1/10395

1/3 + 1/5 + 1/7 + 1/9 + 1/11 + 1/15 + 1/21 + 1/165 + 1/693

1/3 + 1/5 + 1/7 + 1/9 + 1/11 + 1/15 + 1/21 + 1/231 + 1/315

1/3 + 1/5 + 1/7 + 1/9 + 1/11 + 1/15 + 1/33 + 1/45 + 1/385

1/3 + 1/5 + 1/7 + 1/9 + 1/11 + 1/15 + 1/35 + 1/45 + 1/231

The whole output was


2.828968253968251
    + 1/3 + 1/5 + 1/7 + 1/9 + 1/11 + 1/15 + 1/21 + 1/135 + 1/10395
1
    + 1/3 + 1/5 + 1/7 + 1/9 + 1/11 + 1/15 + 1/21 + 1/165 + 1/693
1
    + 1/3 + 1/5 + 1/7 + 1/9 + 1/11 + 1/15 + 1/21 + 1/231 + 1/315
1
    + 1/3 + 1/5 + 1/7 + 1/9 + 1/11 + 1/15 + 1/33 + 1/45 + 1/385
1
    + 1/3 + 1/5 + 1/7 + 1/9 + 1/11 + 1/15 + 1/35 + 1/45 + 1/231

19999

 done
 
 
The first number printed was just a verification that the reference table was constructed correctly, by checking its highest entry. The table was used in the program to see if there were sufficiently large numbers in the next few to get to at least 1 as a total. Combined with stopping the recursion if the total got to over 1 or the number of terms would get to more than 9, this speeded up processing.

The number 19999 at the end indicated we reached the limit of the entries we were trying for. If it had stopped short of that value, we could say we reached a natural limit and that there were no further answers. But that's not the case so we haven't show that we have all the answers. This was probably to be expected as the series diverges, so this method would never show a lack of possibility for further solutions.

Discussions while in the queue, with reference to outside web sites, indicate these are the only five possibilities, but this program does not prove that. The very determination to go to 20,000 was based on a knowledge of the answer, and so is really a cheat.

DefDbl A-Z
Dim crlf$, h(36), tot, sumNext(1 To 9, 20000), highI


Private Sub Form_Load()
 Form1.Visible = True
 
 
 Text1.Text = ""
 crlf = Chr$(13) + Chr$(10)
 
 For i = 20000 To 1 Step -1
   sumNext(1, i) = 1 / i
   For n = 2 To 9
     For j = i To i + n - 1
       If j <= 20000 Then
         sumNext(n, i) = sumNext(n, i) + sumNext(1, j)
       End If
     Next
   Next
 Next
 
 Text1.Text = Text1.Text & sumNext(9, 1)

 For st = 1 To 101 Step 2
   h(1) = st: tot = 1 / st
   addOn 2
 Next
 
 Text1.Text = Text1.Text & crlf & highI & crlf
 
 Text1.Text = Text1.Text & crlf & " done"
  
End Sub

Sub addOn(wh)
  DoEvents
  st = h(wh - 1) + 2
  For i = st To 20000 Step 2
    DoEvents
    h(wh) = i
    savetot = tot
    tot = tot + sumNext(1, i)
    If Abs(tot - 1) < 0.0000000000001 And wh = 9 Then
       Text1.Text = Text1.Text & tot & crlf & "   "
       For j = 1 To wh
         Text1.Text = Text1.Text & " + 1/" & h(j)
       Next
       Text1.Text = Text1.Text & crlf
    End If
    If i < 20000 And tot < 1.0001 And wh < 9 Then
     If tot + sumNext(9 - wh, i + 1) + 0.000000001 >= 1 Then
      If i > highI Then highI = i
      addOn wh + 1
     End If
    End If
    tot = savetot
  Next
End Sub


  Posted by Charlie on 2017-06-21 16:02:27
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (17)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information