Factorise $f(a, b, c)=a^3+b^3+c^3$, if $a^2+b^2=c^2$. A while ago, in one of my country's respected mathematical journals, this problem came up:

If $a^2+b^2=c^2,$ factorise the following expression over the integers: $f(a, b, c)= a^3+b^3+c^3.$

I was baffled as I could not find a way around the problem. It reminded of a certain identity of Euler's but this was different and something seemed pretty off about the question itself. Anyway, $f$ is symmetric and invariant under all permutations of $a, b, c$ and homogeneous of $\deg 3$, meaning that $f(ta, tb, tc)=t^3f(a, b, c) \forall t \in \mathbb{Z}$, so the odd part was that $a^2+b^2=c^2$ is not symmetric for all those permutations aforementioned. Why would a distinction between $a, b, c$ be made in the requirement in the first place? Furthermore, the authors never responded with any answer whatsoever. I would very much appreciate if you could help untangle this problem and either solve it or prove definitively that it is impossible (which I think is much more likely). I believe I have tried every single possible way to factorise it but I have not been able to create any common factors between all three.

Since $a^2 + b^2 = c^2$, then $(a, b, c)$ is a Pythagorean triple.
Without loss of generality, we may assume that
$$a = m^2 - n^2, b = 2mn, c = m^2 + n^2.$$
(I forgot if there is an extra condition on $m$ and $n$.)
WolframAlpha then gives the factorization
$$(m^2 - n^2)^3 + (2mn)^3 + (m^2 + n^2)^3 = 2m^2 (m + n)^2  (m^2 - 2mn + 3n^2).$$
This may be finally rewritten in terms of $a$, $b$, and $c$ as
$$a^3 + b^3 + c^3 = (a + c)(b + c)(2c - b - a).$$
