2

Suppose that $5\leq q\leq p$ are both prime. Prove that $24|(p^2-q^2)$.

This is what I got so far. I figured that since $p,q$ are bigger than $5$, there are only odd primes for this conjecture. Then I can rename $p=2m+1,q=2n+1,m,n∈Z$. We want to show $(p^2-q^2 )=24k,k∈Z$. By substituting $2m+1$ for $p$ and $2n+1$ for $q$, we get $((2m+1)^2-(2n+1)^2)$. If we expand it, we get $4(m^2+n^2+m-n)$ Q. I think I can make $4(m^2+n^2+m-n)$ look like $24k$. How should I approach ?

And my prof. commented that "I would take this proof in small steps. Rather than trying initially to prove that $24 | p^2-q^2$, look at the progress you already have. You proved $4 | p^2-q^2$. Can you prove 8 is a factor? What about 3? Then see if you can put together what you have to get 24 as a factor."

I am stuck here. Any helps?

Wes
  • 497

5 Answers5

16

Note that since both $p,q\geq 5$ are primes, they cannot be divisible by $3$, so $p^2\equiv q^2\equiv 1\pmod{3}$, which implies that $3|p^2-q^2$.

Similarly, all odd squares are congruent to $1$ modulo $8$, so $8|p^2-q^2$ as well.

Putting these two facts together, it follows that $24|p^2-q^2$.

Eric Naslund
  • 72,099
4

$p+q$ and $p-q$ are even numbers and their sum is not divisible by $4$. Hence one of $p+q$ and $p-q$ is divisible by $4$. For divisibility by $3$ you can assume the contrary: in that case their sum $2p$ or their difference $2q$ would be divisible by $3$.

njguliyev
  • 14,473
  • 1
  • 26
  • 43
4

Here is a pedestrian solution.

You can prove even stronger result: $24|p^2-1$ for any prime $p>5$. Indeed, consider three consecutive numbers $p-1, p, p+1$. Since $p$ is odd, then $p-1$ and $p+1$ are consecutive even numbers. Furthermore one of them is divisible by $4$. Therefore, $p^2-1=(p-1)(p+1)$ is divisible by $2\cdot 4=8$. Since $p-1, p, p+1$ are three consecutive numbers and $p$ is prime then either $p-1$ or $p+1$ is divisible by $3$. Hence $p^2-1$ is divisible by $3\cdot 8=24$.

Finally, $24|p^2-q^2$ for primes $q\geq p>5$ because by previous lemma and the equality $p^2-q^2=(p^2-1)-(q^2-1)$.

Norbert
  • 56,803
2

HINT:

Any prime $>3$ must be of the form $6a\pm1$ where $a$ is any integer $>0$

Now,$$(6a\pm1)^2=36a^2\pm12a+1=24a^2\pm24\frac{a(a\pm1)}2+1\equiv1\pmod{24}$$

Observe that $6a\pm1$ is not necessarily prime, but is only relatively prime to $6$.

$\displaystyle\implies p^2\equiv1\pmod{24}$ if $(p,6)=1$

1

If you begin to list the natural numbers in 6 columns:

 0  1  2  3  4  5
 6  7  8  9 10 11
12 13 14 15 16 17
...

it is evident that prime numbers $\ge5$ can only occur in the 2nd and 6th columns, since everything else is a multiple of 2 or 3. In other words $$p=6n\pm1\\q=6m\pm1$$ for some $n,m\in\mathbb{N}$. It directly follows that $$p^2-q^2=12[n(3n\pm1)-m(3m\pm1)]$$ where both $\pm$ are independent of each other. However $n(3n\pm1)$ and $m(3m\pm1)$ must both be even, so $n(3n\pm1)-m(3m\pm1)=2k$ for some $k\in\mathbb{N}$: $$p^2-q^2=24 k.$$

Matt
  • 730
  • 5
  • 14