$n^2+np$ is a perfect square 
Let $p > 2$ be a prime. Prove that there exists exactly one positive integer $n$ such that $n^2+np$ is a perfect square.

I tried bounding the expression $n^2+np$ between two perfect squares, but I wasn't able to because there was no constant term. We know that $n^2+np < \left(n+\frac{p}{2}\right)^2$, but I couldn't get a lower bound. How can we solve the question?
 A: $$n^2+np=k^2 \to n^2+np-k^2=0\\
n=\frac{-p+ \sqrt{p^2+4k^2}}{2}$$
So,
$$p^2+4k^2=q^2\to p^2=(q-2k)(q+2k)$$
once $p>2$ is prime and $n>0$ (which means $k\ne 0$ and then $q-2k\ne q+2k$), then the only one possibility is write
$$q-2k=1\\
q+2k=p^2$$
what give us
$$q=\frac{p^2+1}{2}$$
and then
$$n=\frac{-p+ q}{2}=\left(\frac{p-1}{2}\right)^2$$
A: First off we check that $p$ cannot divide $n$.  Note that if $n= pk$ then $n^2 + np = p^2(k^2+k)$.  Now this cannot be a perfect square because $k^2 < k^2+k < (k+1)^2$.
If $n$ is relatively prime to $p$, then $n+p$ is relatively prime to $n$, and $n^2+np = n(n+p)$ is a perfect square precisely when both $n$ and $n+p$ are squares.  If we write $n= i^2, n+p=j^2$, then $p = j^2-i^2 = (j-i)(j+i)$.  As $p$ is prime, we have $j-i=1, j+i = p$, so that $i = (p-1)/2$ and $j = (p+1)/2$.
This shows that $n = (p-1)^2/4$ is the only value for which $n^2+np$ is a perfect square.
A: Let's find all integers $n$ such that $n^2+pn$ is a square, then show that only one of of them is positive.
If $n^2+pn=m^2$ then $pn=(|m|-n)(|m|+n)$, so without loss of generality we can assume $m=n+pk$ for some integer $k$.  Now writing
$$n^2+pn=(n+pk)^2=n^2+2pkn+p^2k^2$$
we see
$$(1-2k)n=pk^2$$
But $\gcd(1-2k,k^2)=1$, so we must have $(1-2k)\mid p$.  This gives four possibilities (using the fact that $p$ is an odd prime):
$$\begin{align}
1-2k=1&\implies k=0\implies n=0\\
1-2k=-1&\implies k=1\implies n=-p\\
1-2k=p&\implies k={1-p\over2}\implies n=\left(1-p\over2\right)^2\\
1-2k=-p&\implies k={1+p\over2}\implies n=-\left(1+p\over2\right)^2\\
\end{align}$$
Only the third possibility has a positive value for $n$.
