Search
As of October, 2016, Embarcadero is offering a free release
of Delphi (Delphi
10.1 Berlin Starter Edition ). There
are a few restrictions, but it is a welcome step toward making
more programmers aware of the joys of Delphi. They do say
"Offer may be withdrawn at any time", so don't delay if you want
to check it out. Please use the
feedback
link to let me know if the link stops working.
Support DFF  Shop
If you shop at Amazon anyway, consider using
this link. We receive a few cents from each purchase.
Thanks.
Support DFF  Donate
If you benefit from the website, in terms of
knowledge, entertainment value, or something otherwise useful,
consider making a donation via PayPal to help defray the
costs. (No PayPal account necessary to donate via credit
card.) Transaction is secure.
Contact
Feedback:
Send an
email with your comments about this program (or anything else).

 
Problem Description
This program investigates Euler's
Sum of Powers Conjecture looking especially for counterexamples which
prove the conjecture untrue.
Background & Techniques
In the 18th century,
mathematician Leonhard Euler conjectured that if the sum of the k^{th}
powers of two or more positive integers is itself the kth power of a
positive integer, then the number of terms must be at least k. For
example, the sum of 2 cubes can not be a cube but thee cubes can be, the sum of two or three
4th powers cannot be a 4th power, but four 4th powers can be, etc.
It turns out that the conjecture is not true. There exists three 4^{th}
powers which sum to a 4^{th} power and four 5^{th}
powers which sum to a 5^{th} power! This program will find the
smallest counterexample of the 5^{th} power case in a few
seconds using a direct search with the initial program defaults. The 4^{th}
power counterexample has values too large to be found by this method.
The jury is still out on whether the conjecture is true for 6^{th}
and higher powers since no counterexamples have been found.
The current program can find many examples of two or more squared terms
which sum to a square. These are the "Pythagorean Triples" you learned
about in high school. Euler's Conjecture is an extension of "Fermat's
Last Theorem" which says that there are no solutions to a^{n }+
b^{n }= c^{n} for any n>2. I believe that it has also
been proven that there are no two cubes which sum to a cube but we can
quickly generate many examples with 3 cubes summing to a cube. Run time
problems begin with the higher powers even though we check several
million terms per second. The first four term 4th power sum is found in
140 seconds and the first five term 5^{th} power sum takes 1240
seconds (5.5 billion terms checked!). The next program version will try
to confirm the 4^{th} term counterexample by incorporating the
more efficient LanderParkin Algorithm
described in a paper at
http://www.ams.org/journals/mcom/196721097/S002557181967
02206693/S00255718196702206693.pdf
Nonprogrammers are welcome to read on, but may
want to skip to the bottom of this page to
download executable version of the program.
Notes for Programmers
For efficiency the search is driven with a table containing the specified
power values of the specified maximum value to be searched. This makes
generating variable candidates very fast, the Nth power of N is located at
Table[n]. Checking whether a sum is also in the table is slower, the
program currently searches sequentially from the highest final root variable
index + 1 until we reach the end of the table or a table entry greater than
or equal to the sum being checked. If the entry is equal, we
have a solution.
Running/Exploring the Program
Suggestions for Further Explorations

Optimize check for solution (binary
search?). Keep table in a TIntlist? 

Implement the LanderParkin Algorithm to
speed searches for counterexamples. 
Original Date: July 23, 2013 
Modified:
February 18, 2016


