Created
October 9, 2023 01:50
-
-
Save qalle2/8d0a830a4470c05cd61363e399e21044 to your computer and use it in GitHub Desktop.
The fifth power of 72
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A Python program that proves a = 72 is the smallest solution to | |
a^5 = b^5 + c^5 + d^5 + e^5 + f^5 where a...f are positive integers. | |
Prints 72 (19, 43, 46, 47, 67). | |
import itertools | |
for base in range(1, 72 + 1): | |
for comb in itertools.combinations_with_replacement(range(1, base), 5): | |
if sum(b ** 5 for b in comb) == base ** 5: | |
print(base, comb) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment