1 | initial version |
Elementary version
sage: for a in srange(1, 5000):
....: for b in srange(1, a+1):
....: for c in srange(1, b+1):
....: if (a+b+c).is_square() and (a^2+b^2+c^2).is_square() and (a^3+b^3+c^3).is_square():
....: print(a,b,c)
A little bit more elaborate
sage: for abc in srange(1, 10000):
....: abc = abc*abc
....: for a in srange((abc + 2)// 3, abc):
....: for b in srange((abc - a + 1)//2, min(a, abc - a)):
....: c = abc - a - b
....: if (a^2+b^2+c^2).is_square() and (a^3+b^3+c^3).is_square():
....: print(a,b,c)
From which you get the list: (129, 124, 108), (516, 496, 432), (1161, 1116, 972), (2873, 2134, 34), (2064, 1984, 1728), (3225, 3100, 2700), ...