How many values of $x$ are there such that $\sqrt{x(x+p)}$ is a positive integer for some $p$? 
How many values of x are there such that there exists positive integer solutions for S, such that  $S=\sqrt{x(x+p)}$ where $x$ is an integer and $p$ is a prime number $>2$?

This is a problem I made and will submit to brilliant.org, but before I do that I want some advice and your viewpoints.

Here is my proof:
First we can say that since (p>2), it will always be odd since it a prime number.
In order to have (S) as positive we must have (x)  as  a perfect square. This also implies that (x+p) should also be a perfect square.
(Proof):
Suppose, let us assume that (x) is not a perfect square. It implies, that (x+p) also cannot be a perfect square.
(CASE 1:)
When (x) is an even number(not a perfect square), we have ((x+p)) as odd. This implies that we will always remain with the irrational number (\sqrt{2}), since (x) will have an odd power of (2) as it is not a perfect square and (x+p) is odd. (S) thus cannot be a positive integer.
(CASE 2:)
Similarly, when (x) is odd, (x+p) is even:
When (x+p) is not a perfect square then we can easily conclude that we will never find a positive solution for (S) since (x) and (x+p) are in opposite parity and both are imperfect squares.
Thus we reach a contradiction.
Therefore we must have (x=N^2) and (x+p=Y^2) where (N) and (Y) are integers other than (0).(Since we already considered the cases with 0).
Now,
$Y^2-N^2=p$
$\Rightarrow (Y+N)(Y-N)=p$
Thus, it follows that (Y+N) and (Y-N)  are factors of (p) thus they can either be equal to (1) or (p).
On solving we get $Y=\frac{p+1}{2}$ and $N=\frac{1-p}{2}$ or $N=\frac{p-1}{2}$ depending upon what we take (Y+N) and (Y-N) as, and (N) and (Y) can easily be verified to be integers.
Thus we can conclude that, there exists a solution for which (x) and (x+p) are perfect squares.
There is another solution when $x=-N^2$ and $x+p=-Y^2$.
So there are $2$ solutions in total.
 A: It it valid to state that whenever $x$ is a multiple of $p$ there is no solution.
Next, whenever $x$ is not a multiple of $p$ $gcd(x,x+p)=1$.
As such, it follows that if $x$ and/or $x+p$ are imperfect squares, then there exists no solutions.
So,
$x=N^2$
$x+p=Y^2$
A: Suppose that $x(x + p) = y^2$.
Then $y \equiv \pm x \pmod p$, so let $y = kp \pm x$ for some $k \in \mathbb{Z}$.
We have $k^2p^2 \pm 2kpx + x^2 = x^2 + px$ so $k^2p = x(1 \pm 2k)$.
By the Euclidean Algorithm, $(k,1 \pm 2k) = 1$, hence $k^2 | x$, which implies $x = k^2, -k^2, pk^2, \text{ or } -pk^2$.


*

*If $x = \pm p k^2$, then $x(x + p) = p^2 k^2 (k^2 \mp 1)$, only a perfect square if $k = 0$.

*If $x = \pm k^2$, then $x$ and $x + p$ are perfect squares, as you have already analyzed in your post.

A: If i go by your conventions, i was not able to directly understand your question. So i tried the question by myself and by my variables.
Let x be odd first.
So x is odd and x+p even.
If x is not a perfect square, then x+p must be in form of (y^2)x where y is an integer.
So y= root of (p+x)/x.  If p is not equal to x, y must be a fraction, which is not possible. So p is equal to x and S=(root of 2)*x, which is not an integer. So if x is odd then x must be a perfect square and so should be x+p. 
Let x be some k^2 and x+p be h^2.
So h^2+p=k^2.
=>p=k^2-h^2=(h+k)(k-h).
Now if p is prime it must have 1 and the no. itself only as the factor. If you equate both h+k and k-h in seperate cases, you will get the same result where p is 2k-1. So h is k-1. So k is (p+1)/2 and h is (p-1)/2.
So you get h and k for both even and odd conditions (the very first assumption i took).
Since x is an integer, you also have -h and -k too as the answers.
Now if you take out S by h and k, you could get it in terms of p (which is
S=[(p^2)-1]/2.
Not only here you get S in terms of p (that means if x is a natural no. taken such that x is a perfect square then S has no relation to x since here h, p and k are interrelated.), but i think it is a lot simpler to understand.
)
I know this is a bit lengthy, but simple, but what fancy do you expect from a 15 year old?
But i am amazed to see how x comes out to be related to p if x is a perfect square.
