How to resolve the algorithm Euler's sum of powers conjecture step by step in the AWK programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm Euler's sum of powers conjecture step by step in the AWK programming language

Table of Contents

Problem Statement

There is a conjecture in mathematics that held for over two hundred years before it was disproved by the finding of a counterexample in 1966 by Lander and Parkin. This conjecture is called Euler's sum of powers conjecture and can be stated as such: In 1966, Leon J. Lander and Thomas R. Parkin used a brute-force search on a CDC 6600 computer restricting numbers to those less than 250. The task consists in writing a program to search for an integer solution of

x

0

5

x

1

5

x

2

5

x

3

5

=

y

5

{\displaystyle x_{0}^{5}+x_{1}^{5}+x_{2}^{5}+x_{3}^{5}=y^{5}}

where all

x

i

{\displaystyle x_{i}}

and

y

{\displaystyle y}

are distinct integers between 0 and 250 (exclusive). Show an answer here. Related tasks are:

Let's start with the solution:

Step by Step solution about How to resolve the algorithm Euler's sum of powers conjecture step by step in the AWK programming language

Source code in the awk programming language

# syntax: GAWK -f EULERS_SUM_OF_POWERS_CONJECTURE.AWK
BEGIN {
    start_int = systime()
    main()
    printf("%d seconds\n",systime()-start_int)
    exit(0)
}
function main(  sum,s1,x0,x1,x2,x3) {
    for (x0=1; x0<=250; x0++) {
      for (x1=1; x1<=x0; x1++) {
        for (x2=1; x2<=x1; x2++) {
          for (x3=1; x3<=x2; x3++) {
            sum = (x0^5) + (x1^5) + (x2^5) + (x3^5)
            s1 = int(sum ^ 0.2)
            if (sum == s1^5) {
              printf("%d^5 + %d^5 + %d^5 + %d^5 = %d^5\n",x0,x1,x2,x3,s1)
              return
            }
          }
        }
      }
    }
}


  

You may also check:How to resolve the algorithm Infinity step by step in the OpenEdge/Progress programming language
You may also check:How to resolve the algorithm Brace expansion step by step in the PHP programming language
You may also check:How to resolve the algorithm Empty program step by step in the ERRE programming language
You may also check:How to resolve the algorithm 24 game step by step in the PHP programming language
You may also check:How to resolve the algorithm Draw a sphere step by step in the Befunge programming language