<s>[INST] Solving a univariable identity that satisfies the following relationship: 
Question: Consider the following equations:$$\begin{align*}1^2+2^2+2^3 & =3^2\\2^2+3^2+6^2 & =7^2\\3^2+4^2+12^2 & =13^2\\4^2+5^2+20^2 & =21^2\end{align*}$$
  State a one variable identity that is suggested by these examples.

Since the question asked for a uni-variable identity, I assumed the form$$(ax+b)^2+(cx+d)^2+(ex+f)^2=(gx+h)^2\tag1$$
And equated coefficients to get an undermined system. Namely,$$\begin{align*} & a^3+c^3+e^3=g^3\\ & ab+cd+ef=gh\\ & b^2+d^2+f^2=h^2\end{align*}$$
And solving for integer solutions (I set $(a,c,e,g)=(1,2,2,3)$ and solved the remaining system) to get$$(x+2)^2+(2x+4)^2+(2x+4)^2=(3x+6)^2$$
Which works for $x\in\mathbb{Z}$. However, the question asked for an identity that gave the examples listed above. Something my formula clearly isn't capable of.
So my actual question is simple: How would you go about solving this problem?
 [/INST] I believe the identity you are looking for contains a quadratic for  $n$, $$n^2+(n+1)^2+(n^2+n)^2=(n^2+n+1)^2$$
Putting $n=1,2,3,4$ gives $$\begin{align*}1^2+2^2+2^3 & =3^2\\2^2+3^2+6^2 & =7^2\\3^2+4^2+12^2 & =13^2\\4^2+5^2+20^2 & =21^2\end{align*}$$
Which are the examples above.  These identities are well known, and can also be noticed since of our given numbers on the left hand side the rightmost number is the product of the other two. 
PROOF OF THE IDENTITY
It is well known $(x+1)^2-x^2=2x+1$
Now $$n^2+(n+1)^2=2n^2+2n+1=(n^2+n+1)^2-(n^2+n)^2$$
</s>