If p>=q>=5 and p and q are both primes, prove that 24|(p^2-q^2).

Thank.

2. Originally Posted by konna
If p>=q>=5 and p and q are both primes, prove that 24|(p^2-q^2).

Thank.
What have you tried yourself? Of course, $p^2- q^2= (p- q)(p+q)$ since p and q are both primes larger than 3, they are both odd and so both p-q and p+q are even- their product is, at least, divisible by 4. Now see if you can find another factor of 2. If p= 2m+1 and q= 2n+1, p+q= 2m+2n+ 2= 2(m+n+1) and p- q= 2m- 2n= 2(m-n). Consider what happens to m+n+1 and m-n if m and n are both even, both odd, or one even and the other odd. Notice that so far we have only required that p and q be odd, not that they be prime.

Once you have done that the only thing remaining is to show that $p^2- q^2$ must be a multiple of 3 and that means showing that either p-q or p+q is a multiple of 3.

3. Originally Posted by konna
If p>=q>=5 and p and q are both primes, prove that 24|(p^2-q^2).

Thank.

$p^2-q^2=(p-q)(p+q)$ , and as:

1) $x^2=1\!\!\!\!\pmod 3\,\,\,\forall\,x$ not a multiple of 3 ;

2) either $p-q$ or $p+q$ is divisible by 4, and the other one by 2.

The result follows at once.

Tonio

4. I used to try by myself , but i not sure my process.

Thank so much ..

5. Hello, konna!

I don't know if this qualifies as a proof.

If $p \geq q \geq 5$ and $p$ and $q$ are both primes,

. . prove that: . $24\,|\,(p^2-q^2)$

Any prime greater than or equal to 5 is of the form: . $6m \pm 1$
. . for some integer $m.$

Let: . $\begin{array}{ccc}p &=& 6m \pm 1 \\ q &=& 6n \pm1\end{array}$

Then: . $\begin{array}{ccc}p^2 &=& 36m^2 \pm 12m + 1 \\ q^2 &=& 36n^2 \pm12n + 1 \end{array}$

Subtract: . $p^2-q^2 \;=\;36m^2-36n^2 \pm 12m \mp 12n \;=\;36(m^2-n^2) \pm12(m - n)$

. . . . . . . $p^2-q^2 \;=\;36(m-n)(m+n) \pm12(m - n)$
. . . . . . . $p^2-q^2 \;=\;12(m-n)\bigg[3(m+n) \pm 1\bigg]$

We see that $p^2-q^2$ is divisible by 12.

We must show that either $(m-n)$ or $[3(m+n) \pm1]$ is even.

If $m$ and $n$ has the same parity (both even or both odd),
. . then $(m-n)$ is even.

If $m$ and $n$ have opposite parity (one even, one odd),
. . then $(m+n)$ is odd.
And . $3(m+n)$ is odd.
. . Then: . $3(m+n) \pm1$ is even.

Therefore, $p^2-q^2$ is divisible by 24.