Perfect Square With Two Integer Variables I am trying to solve a number theory problem in general form. However, I got stuck in the following step:
$a,b,n \in \mathbb Z^{+}$ for which values of $n$, this equation is solvable $\frac{(n+1)(n+2a)}{2} = b^2$ ?
Can we make a general statement about $n$ ? By the way I have tried to apply some inequalities with cases $n>a$, $n<a$ and $n=a$ . Also I think modular arithmetic doesn't work so good for this problem.

Clearing denominators and expanding, the question is to find all $n\in\Bbb{Z}$ for which there exist $a,b\in\Bbb{Z}$ such that
$$2b^2=(n+1)(n+2a).$$
So let $n\in\Bbb{Z}$ be given and suppose $a,b\in\Bbb{Z}$ satisfy the above.
Clearly $2b^2$ is divisible by $n+1$, say
$$2b^2=m(n+1),$$
for some $m\in\Bbb{Z}$. It follows that
$$2a=\frac{2b^2}{n+1}-n=m-n,$$
where in particular $m\equiv n\pmod{2}$. With this in mind, let's see for which $n\in\Bbb{Z}$ we can find appropriate $a,b\in\Bbb{Z}$.

*

*If $n$ is even, say $n=2k$, we can take $b=n+1$ to get
$$2b^2=2(n+1)^2,$$
corresponding to $m=2(n+1)$, and correspondingly $a=\frac{m-n}{2}=k+1$, to get
$$\frac{(n+1)(n+2a)}{2}=\frac{(2k+1)(2k+2k+2)}{2}=(2k+1)^2=(n+1)^2=b^2.$$


*If $n$ is odd then $n+1$ is even, so $n+1=2^ck$ for some $c,k\in\Bbb{Z}$ with $c\geq1$ and $k$ odd. If $c$ is odd, say $c=2d+1$, then we may take $b=2^dk$ to get
$$2b^2=2(2^dk)^2=2^{2d+1}k^2=2^ck^2=k(n+1),$$
corresponding to $m=k$, and correspondingly $a=\frac{m-n}{2}=\frac{k+1}{2}-2^{2d}k$, to get
$$\frac{(n+1)(n+2a)}{2}=\frac{2^ck\cdot k}{2}=(2^dk)^2=b^2.$$


*Finally, if $n$ is odd and $n+1=2^ck$ with $c$ is even, say $c=2d$, then
$$2b^2=m(n+1)=2^cmk=(2^d)^2mk,$$
which shows that $m$ is divisible by $2$, i.e. $m\equiv0\pmod{2}$. But this contradicts $m\equiv n\pmod{2}$. So for $n$ of the form $n=4^dk-1$ with $k$ odd and $d\geq1$ there are no such $a$ and $b$.
