# Can $2a^2+2a+2ab^2+b^2$ be written algebraically as the sum of three triangular numbers?

Let $T(n)=\tfrac{1}{2}n(n+1)$ denote the $n$th triangular number. I'm looking for an identity of the form $$2a^2+2a+2ab^2+b^2 = T(f(a,b)) + T(g(a,b)) + T(h(a,b))\tag{\star}$$ where $a,b$ are integers, and $f,g,h$ are polynomials in $a,b$ with rational (or, better yet, integral) coefficients. In other words, I'm trying to apply to the left-hand side of ($\star$) an algebraic analogue the well-known fact that every integer is the sum of three triangular numbers.

NOTE: This was edited from $b$ to $b^2$, after it was rightly pointed out by Ward Beullens that the degree of the two sides couldn't match.

• You can come up with much. I need to write a more specific equation. For example, this: $a^2+a+b^2+b=x^2+x+y^2+y+z^2+z$ – individ Sep 9 '14 at 17:43

This is impossible, the left hand side is of degree one in $b$, and the right-handside is of degree $2 \max(deg(f),deg(g),deg(h))$ in b, so it is always even.
We know this because the degree of $T(f(x))$ is 2 times the degree of $f$, and the leading terms of the 3 polynomials are all positive, so they cannot cancel.
• For the new question the problem still exists. Consider the special case of $a = b$ in that case the degree of the left-hand side is 3. But the degree of the right-hand side is still even. – Ward Beullens Sep 9 '14 at 18:22