<s>[INST] One Diophantine equation I wonder now that the following Diophantine equation:
$2(a^2+b^2+c^2+d^2)=(a+b+c+d)^2$
have only this formula describing his decision?
$a=-(k^2+2(p+s)k+p^2+ps+s^2)$
$b=2k^2+4(p+s)k+3p^2+3ps+2s^2$
$c=3k^2+4(p+s)k+2p^2+ps+2s^2$
$d=2k^2+4(p+s)k+2p^2+3ps+3s^2$
$k,p,s$ - what some integers.
By your question, I mean what that formula looks like this. Of course I know about the procedure of finding a solution, but I think that the formula would be better.
 [/INST] My more general method of calculation. Enables us to solve and other factors. Find out whether or when given coefficients solutions and immediately write the formula.
For example, consider the equation:
$4(a^2+b^2+c^2+d^2)=3(a+b+c+d)^2$
Then the solutions are of the form:
$a=-(p^2+4(k+s)p+2k^2+2ks+2s^2)$
$b=p^2+4(k+s)p+6k^2+6ks+2s^2$
$c=p^2+4(k+s)p+2k^2+6ks+6s^2$
$d=3p^2+4(k+s)p+2k^2-2ks+2s^2$
I think the best result by a direct solution of these equations. Brute force search of the law or does not make sense. Spend a lot of effort, but the result does not always work.
</s>