MathLabs

Problem 4

Find all functions f:Z→Zf:\mathbb Z\to\mathbb Z such that for all integers a,b,ca,b,c with a+b+c=0a+b+c=0, f(a)2+f(b)2+f(c)2=2f(a)f(b)+2f(b)f(c)+2f(c)f(a)f(a)^2+f(b)^2+f(c)^2=2f(a)f(b)+2f(b)f(c)+2f(c)f(a).
Step 5 of 5: The period-four family and the complete list
In plain words

The only remaining branch has period 4; together with the quadratic and period-two families it exhausts all possibilities.

f(n)={0,4∣n,c,n odd,4c,n≡2(mod4),f(n)=\begin{cases}0,&4\mid n,\\ c,&n\text{ odd},\\4c,&n\equiv2\pmod4,\end{cases}
Detailed analysis

In the nonperiodic alternative above, if the induction first takes the lower branch then the same substitution forces n=2, hence f(3)=f(1)f(3)=f(1); the equation at (1,3,4)(1,3,4) then gives f(4)=0f(4)=0, so period 4. Evenness and the defining equation give exactly f(4t)=0f(4t)=0, f(4t+1)=f(4t+3)=cf(4t+1)=f(4t+3)=c, f(4t+2)=4cf(4t+2)=4c. Thus all solutions are f(n)=cn2f(n)=cn^2; f(n)=0f(n)=0 for even n and c for odd n; or the displayed period-four family, with arbitrary c∈Zc\in\mathbb Z.