The number is a perfect square if and only if $k=n$ Let $k$ and $n$ be positive integers. Show that $$(k+1)^2k^2(n+1)^4-2k(k+1)n(n+1)^2(2kn+k+1)+n^2(k+1)^2$$ is a perfect square if and only if $k=n$.

For $k=3$ and $n=792$,
$$
(k+1)^2k^2(n+1)^4-2\,k\,(k+1)\,n\,(n+1)^2(2\,k\,n+k+1)+n^2(k+1)^2=309\,396^2.
$$
This is the only perfect square for $1\le k\le2\,000$, $1\le n\le10\,000$ and $k\ne n$.
