3

For what primenumbers, $p$, is $\sqrt{5p +49}$ an integer?

I managed to figure out:

$5p +49 = n^2$

$5p = (n+7)(n-7)$

But can't think of anything more than that, anyone able to solve this without bruteforcing?

For primenumbers under $10^7$, the solutions are $3$ and $19$.

  • a parity argument or two may help you. –  Sep 28 '17 at 22:14
  • 3
    For $(n+7)(n-7)$ to be a product of two primes, you must either have $n-7=\pm 1$ or $n+7=\pm 1$, or $n+7,n-7$ both irreducible (prime or negative of a prime) - and in the latter case, since 5 is one of the primes, you know either $n+7=\pm 5$ or $n-7=\pm 5$. – Daniel Schepler Sep 28 '17 at 22:18

2 Answers2

3

You're close.

You have $5p=(n+7)(n-7)$ for some integer $n$. Without loss of generality we may assume that $n$ is nonnegative, if $n$ were negative we could render $(n+7)(n-7)=(|n|-7)(|n|+7)$ where $|n|$ is nonnegative. Since $n+7$ is thereby positive we need $n-7$ positive too, so the nonnegative $n$ is at least $8$.

From the uniqueness of prime factorization over positive integers we are sure that the factors $n+7$ and $n-7$ must be $5$ and $p$ in some order, or else $1$ and $5p$ in some order. Obviously $n+7$ can't be $1$ or $5$ for nonnegative $n$, so $n-7$ must be $1$ or $5$ instead forcing $n\in\{8,12\}$. With $n-7=1, n=8$ we get $n+7=5p=15$ thus $p=3$. With $n-7=5,n=12$ we get $n+7=p=19$. The full solution set for the prime $p$ is then $\{3,19\}$.

Oscar Lanzi
  • 39,403
2

Then $n-7=5$ and $n+7=p$, that is $n=12$ and $p=19$.

Or $n-7=-5$ and $n+7=-p$, that is $n=2$ and $p=-9$ which is negative.

Or $n+7=5$ and $n-7=p$, that is $n=-2$ and $p=-9$ which is negative.

Or $n+7=-5$ and $n-7=-p$, that is $n=-12$ and $p=-19$, which is negative.

Or $n-7=1$ and $n+7=5p$, that is $n=8$ and $p=3$.

Or $n-7=-1$ and $n+7 = -5p$, that is $n=6$ and $p=-13/5$ which is not an integer.

Or $n+7=1$ and $n-7=5p$, that is $n=-6$ and $p=-13/5$ which is not an integer.

Or $n+7=-1$ and $n-7=5p$, that is $n=-8$ and $p=-3$ which is negative.

So in conclusion, the only possible numbers are $p= 3, 19$.

velut luna
  • 9,961