Consider the equation x2+y2+z2=2t2 and make use of the method of Diophantine secants: (tx)2+(ty)2+(tz)2=2, i.e. α2+β2+γ2=2, where α,β,γ∈Q+. Evidently, α=0, β=γ=1 is a solution of the last equation. Now take β=−k1α+1, γ=−k2α+1, with k1,k2∈Q. Then α2+(1−k1α)2+(1−k2α)2=2⇔α(k12α+k22α−2k1−2k2+α)=0. If α=0, we have α=1+k12+k222(k1+k2)⇒β=1+k12+k221+k22−k12−2k1k2, γ=1+k12+k221+k12−k22−2k1k2.
Take k1=pn, k2=pm, n,m,p∈N. Then α=p2+n2+m22(m+n)p, β=p2+n2+m2p2+m2−n2−2mn, γ=p2+n2+m2p2+n2−m2−2mn. Thus, we see that x=2(m+n)p, y=p2+m2−n2−2mn, z=p2+n2−m2−2mn, t=p2+m2+n2, with n,m,p∈N are the solutions of the equation x2+y2+z2=2t2.
First consider m=2, n=1. Then x1=6p, y1=p2−1, z1=p2−7, t1=p2+5. It is evident that for p=6 we have (x1,y1,z1,t1)=1. Then substituting these (x1,y1,z1,t1) into the problem statement we obtain that Q=2P2(t)+2P(xy+yz+zx)−P2(x+y+z)=0, which means that Q1(p)=2P2(p2+5)+2P(p4+12p3−8p2−48p+7)−P2(2p2+6p−8)=0. From the problem conditions it follows that all numbers p of the form p=6k should be the roots of Q1, thus Q1≡0.
Let P(x)=anxn+an−1xn−1+⋯+a1x+a0, with an=0. Then Q1(p)=2(an(p2+5)n+⋯+a0)2+2(an(p4+12p3−8p2−48p+7)n+⋯+a0)2−(an(2p2+6p−8)n+⋯+a0)=(2an2+2an−22nan2)p4n+R1(p), where degR1≤4n−1. Since Q1(p)≡0 and an=0 we have that
2an+2−22nan=0.(1)
Consider p=2m, n=1. Then x2=4m(m+1), y2=5m2−2m−1, z2=3m2−2m+1, t2=5m2+1. For m large enough we have t2>y2>x2>z2, and so these numbers are distinct. If m is even, (x2,z2)=(4m(m+1),3m2−2m+1)=(4(m+1),3m2−2m+1)=(m+1,3m2−2m+1)=(m+1,5m−1)=(m+1,6), thus for m=6 (x2,y2,z2,t2)=1. If we follow the same lines as for the first series (x,y,z,t), we will obtain that Q2(m)=2P2(5m2+1)+2P(47m4+T(m))−P2(12m2)=0, where degT≤3. Let us compute the coefficient at m4n in Q2(m) - it's equal to 2an2⋅52n+2an⋅47n−122nan2=0. Since an=0 we have that:
2an⋅52n+2⋅47n−122nan=0.(2)
Now from (1) and (2) we obtain that an=22n−11 and (22n−1−1)⋅2⋅47n=122n−2⋅52n, whence 2⋅52n+(4⋅47)n=144n+2⋅47n. It's easy to see that the last equality is impossible for arbitrary natural n≥2, since 2⋅52n+(4⋅47)n>188n=(144+44)n≥144n+44⋅144n−1>144n+2⋅47n.
So degP≤1. First assume that degP=1. Then the equality an=22n−11 implies that a1=1, i.e. that P(x)=x+a0. Substitute this polynomial into the initial equality:
2P2(t)+2P(xy+yz+zx)=P2(x+y+z)⇒2(t2+2a0t+a02)+2(xy+yz+zx)+2a0=(x+y+z)2+2(x+y+z)a0+a02⇔4a0t+a02+2a0=2(x+y+z)a0.
If a0=0 then P(x)=x, otherwise 4t+a0+2=2(x+y+z). Substitute here the known series x1=6p, y1=p2−1, z1=p2−7, t1=p2+5 with p=6. Then 4(p2+5)+a0+2=2(2p2+6p−8), and we get that the constant a0 depends on p, which is impossible.
If degP=0 then P=a0=const. From the problem conditions we obtain that 2a02+2a0=a02⇒a0=−2 also a0=0, which means that P(x)=0 or P(x)=−2. An easy check shows that all three polynomials obtained meet all the requirements.