for x in range(2,999999):
sum = 0
for d in [int(y) for y in str(x)]:
sum = sum + d**6
if sum == x:
print sum
100000a+10000b+1000c+100d+10e+f=(a^6)+(b^6)+(c^6)+(d^6)+(e^6)+(f^6)Have fun!
0 <= a <= 9
0 <= b <= 9
0 <= c <= 9
0 <= d <= 9
0 <= e <= 9
0 <= f <= 9
You are not logged in, either login or create an account to post comments
This isn't a homework problem is it?
posted by demiurge at 4:34 PM on February 23 [1 favorite has favorites]