Ask Your Question
0

find four positive integers a,b,c,d whose 5th powers sum to the 5th power of another integer e, i.e. find five integers a,b,c,d,e such that a^5+b^5+c^5+d^5=e^5.

asked 2016-09-05 16:20:27 +0200

anonymous user

Anonymous

updated 2016-09-06 15:00:14 +0200

kcrisman gravatar image

I am working on Sage Math online , on Windows 10

In 1769, Lenhard Euler conjectured that at least n nth powers are required to obtain a sum that is itself an nth power for n>2. Disprove Euler's conjecture by writing an appropriate function and using it to find four positive integers a,b,c,d whose 5th powers sum to the 5th power of another integer e, i.e. find five integers a,b,c,d,e such that a^5+b^5+c^5+d^5=e^5.

I have tried this, but it seems like not given me what I wanted it. By the way, I am not allow to use "IF" Statement at all.

def calculateValues():

    sumoffourvalues = 0

    for i in range(2,6):

        #display each valueS

        print (i)

        #calculate each value its power

        eachpower = pow(i,5)

        #sum of power values of four elements

        sumoffourvalues = sumoffourvalues + eachpower

    print ("power of sumofforvalues",sumoffourvalues)

    #calculating power of fifth element

    fifthelementvalue = pow(6,5)

    print ("power of fifthelementvalue ",fifthelementvalue)

    #Consider like below this way

    #a5+b5+c5+d5−e5=0

    resultantvalue = sumoffourvalues -fifthelementvalue

    print("resultant value is ",resultantvalue)

calculateValues()
edit retag flag offensive close merge delete

Comments

Suggestions. Find a shorter title, maybe "Need help with fifth powers exercise". Format LaTeX code using dollar signs. Format code by indenting it four spaces (and don't skip lines); or select your block of code and click the "code" button (the one with '101 010').

slelievre gravatar imageslelievre ( 2016-09-06 22:20:19 +0200 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2017-03-28 04:37:53 +0200

dan_fulea gravatar image

The following code finds the two solutions in the range of natural numbers $<11\cdot 31$ in a relatively quick manner.

def PossibilitiesMod( p, ordered=True ):
    """Compute all relevant (a,b,c,d) mod p
    """
    F = GF( p )
    powers = list( set( [ a^5 for a in F ] ) )

    possibilities = [ (a, b, c, d) 
                      for a in F for b in F for c in F for d in F
                      if a^5 + b^5 + c^5 + d^5 in powers ]
    if ordered:
        possibilities = [ (a, b, c, d) 
                          for (a, b, c, d) in possibilities
                          if a.lift() <= b.lift() <= c.lift() <= d.lift() ]
    possibilities.sort()
    return possibilities

p1 = 11      ; p2 = 31      ;
F1 = GF( p1 ); F2 = GF( p2 );

matchList1 = PossibilitiesMod( p1, ordered=False )
matchList2 = PossibilitiesMod( p2, ordered=True  )

lift_dic = {}
for x in [ 1 .. p1*p2 ]:
    lift_dic[ ( F1(x), F2(x) ) ] = x

fifthPowers = [ a^5 for a in range( 1, ( p1 * p2 *5^(1/5) ) .n() ) ]
solutions   = []

count = 0
for a1, b1, c1, d1 in matchList1:
    count += 1 
    if count % 1000 == 0:    print count
    for a2, b2, c2, d2 in matchList2:

        a = lift_dic[ ( a1, a2 ) ]
        b = lift_dic[ ( b1, b2 ) ]
        c = lift_dic[ ( c1, c2 ) ]
        d = lift_dic[ ( d1, d2 ) ]

        if a^5 + b^5 + c^5 + d^5 in fifthPowers:
            print "\n\n\n!!! SOLUTION !!! ( %s , %s , %s , %s )\n\n\n" % ( a, b, c, d )
            solutions.append( (a,b,c,d) )

Namely:

( 220 , 168 , 266 , 54 )
( 133 , 110 , 84 , 27 )

The last one is of course:

Lander and Parkin, 1966, "a direct search on the CDC 6600..."

(The first solution above is "twice the second one". Sorry.) To have a feasible search we have restricted first to relevant matches modulo some prime numbers, in our case $11$ and $31$. (Chosen so that the Euler indicator function on them delivers multiples of $5$, the power appearing in the equation.)

For the other related problems with higher powers this is of course too naive and slow...

https://en.wikipedia.org/wiki/Euler's_sum_of_powers_conjecture

http://www.cs.man.ac.uk/~rizos/EqualSums/equalsums.html

http://euler.free.fr/index.htm

(I'm afraid, this answers an other question, not explicitly the one posted above. The "no-if-restriction" is in m.h.o. a good joke, i've got the same feeling as facing "show this inequality without using algebra" some decades ago.)

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-09-05 16:20:27 +0200

Seen: 1,530 times

Last updated: Mar 28 '17