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), ...

Should $x$, $y$, $z$ really be perfect squares?

So $a + b + c$, $a^2 + b^2 + c^2$, $a^3 + b^3 + c^3$ are perfect fourth powers?

Or did you mean $a + b + c$, $a^2 + b^2 + c^2$, $a^3 + b^3 + c^3$ are perfect squares?

If so, write one of the following:

Is this homework? Is this from Project Euler?

What have you tried? What specific problem(s) are you facing?

It is not for homework, I am doing research and I am just trying to find small numerical solutions without using elliptic curves.

I do mean that $a+b+c$, $a^2+b^2+c^2$, and $a^3+b^3+c^3$ are simply perfect squares, not perfect fourths.

And i have been trying to define each as a separate equation but I cant solve for the variables within a range as integers, something like:

for a in range(5000) for b in range(5000) for c in range(5000)

eq1 = a+b+c==x^2 eq2 = a^2+b^2+c^2==y^2 eq3 = a^3+b^3+c^3==z^2

solve([eq1,eq2,eq3],a,b,c,x,y,z)

I know this is not right, I am super new to Sage, please help!