Clearly, a prime fits the criteria if the result of $\sqrt{24x+1}$ is an integer. By trial and error, I have found that seemingly the only primes to fit this criteria are 2, 5 and 7. How would I go about proving that they are the only ones (or, alternatively, that $x$ must be below a certain value and the only primes below this value that fit the criteria are 2, 5 and 7)?
I've gotten as far as stating that for some integer $a$:
$24x + 1 = a^2$
Then, I rearranged this to give:
$ 24x = a^2 - 1\\ 24x = (a+1)(a-1) $
I'm not quite sure where to go from here in order to complete the proof that $x$ cannot be above a certain value. Any help would be much appreciated! I'd prefer hints on where to go next rather than full solutions since I'd much rather reach the full solution myself.