Prime of form $n^2-4$

2.6k Views Asked by At

Show that The only prime of the form $n^2-4$, $n$ being an integer is $3$

We have $n^2-4=(n+2)(n-2)$ Now for $n^2-4$ being prime value of $(n-2)$ must be $1$. Then $n=3$ and putting the value we get $n=(3^2-4)=5$ But we need to get $3$ instead of $5$

But when we put $n=1$ then we get $n^2-4=-3$ may it be a printing mistake?

4

There are 4 best solutions below

0
On BEST ANSWER

Let us consider $p=n^2-4$ be a prime, where $n\ge3$

Since, for $n=1,2,$ $p$ is negative or zero

$p=n^2-4=(n-2)(n+2)$

If $n>3,$ then $n-2>1$ and $n+2>1$

$=> p$ is not a prime

Therefore, $n=3$ is the only possibility.

If $n=3,$ then $p=3^2-4=5$

Therefore, $5$ is the only prime of the form $n^2-4$

0
On

The only prime of the form $(n+2)(n-2)$ can be obtained when $n-2=1$, to avoid a factor. And it turns out that with $n=3$, $n+2=5$ is also a prime.

Hence there is one and only one solution,

$$3^2-4.$$

0
On

Since $n^2-4=3$ leads to $n^2=7$, we can conclude that $3$ is not of the form $n^2-4$.

Since $n^2-4=(n+2)(n-2)$, this can only be a prime if $n-2=1$ and $n+2$ is prime, which happens for $n=3$.

The only prime of the form $n^2-4$ is $5$, which is obtained from $n=3$.

0
On

The way I proved it:

$n^2 - 4 = (n+2)(n-2) = p$

Since $p$ is a prime number, we know its only factors are $p$ and $1$:

$(n+2)(n-2) = p*1$

Therefore, either $n+2 = 1$ or $n-2=1$ (and the other factor equals $p$).

Case 1: $n+2 = 1 \implies n = -1 \implies n^2 - 4 = (-1)^2 - 4 = -3$, which is not prime.

Case 2: $n-2 = 1 \implies n = 3 \implies n^2 - 4 = (3)^2 - 4 = 5$, which is prime