# 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 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 close merge delete