Three variable, second-degree symmetric Diophantine equation

Find integers $f,g,h$ such that $3(f^2+g^2+h^2)=14(fg+gh+hf)$.

You can do it using a computer or by hand.

I tried this problem for ages, got nowhere. Unfortunately I don't know how to program, but I thought it would help a lot here. (Just set up a program to check loads of values until you get one that works?)

I would appreciate any type of solution to this. I only need one (f,g,h) that works.

Thanks!


We have $3(f+g+h)^2 = 3(f^2 + g^2 + h^2) + 6(fg + gh + hf) = 20(fg + gh + hf)$, so that both $f+g+h$ and $fg + gh + hf$ are divisible by $5$.

Plugging in the roots of $(X-f)(X-g)(X-h) = X^3 - (f+g+h)X^2 + (fg+gh+hf)X - fgh$, we find that $f^3 \equiv g^3 \equiv h^3 \equiv fgh\pmod{5}$, which (by uniqueness of cube roots modulo $5$) is only possible if $f\equiv g \equiv h\pmod{5}$, and it follows that $f$, $g$, and $h$ are all divisible by $5$.

But $(f/5,g/5,h/5)$ would then give us another solution of smaller magnitude. By descent, the only possible solution is $(0,0,0)$.