0

I am trying to prove a lemma that the only solution of $q|(p^2-1)$ with $p<q$ is $p=2$ and $q=3$.

i.e if $p<q$ are primes and $q|(p^2-1)$, then $p=2$ and $q=3$.

Since $q|(p^2-1)$, then $q|(p+1)$ or $q|(p-1)$. Since $p<q$, we have only $q|(p+1)$. But I am not sure if $q|(p^2-1)$ implies $q|(p+1)$ or $q|(p-1)$, since $p<q,$ we have $q|(p+1)$. But I got stuck here.

Bill Dubuque
  • 272,048
xyz
  • 1,457
  • $p^2-1=(p+1)(p-1)$, but if $p>2$ then $p+1$ can't be prime, so any prime factor of it must be $<p$. – lulu Sep 08 '20 at 12:55
  • It does not necessarily imply $q|(p+1)$ or $q|(p-1)$ as you can see for many numbers. It of course holds true here but a better and more obvious logic to go by is what @lulu said. – Math Lover Sep 08 '20 at 13:10
  • 1
    To stress: Euclid's Lemma tells us that, for primes $q$, $q,|,ab\implies q,|,a$ or $q,|,b$. – lulu Sep 08 '20 at 13:13

1 Answers1

2

I swear I have seen this exact question a few moments ago, but here goes nothing:

$$q\mid(p^2-1)=(p-1)(p+1)\implies q\mid (p-1) \text{ or } q \mid (p+1)$$

the above is a basic property of primes.

We have $q \mid (p-1) \implies p-1\ge q$. But $p<q\le p-1$ is a contradiction.

Therefore we must have $q\mid (p+1)$.

This implies $p+1 \ge q$, which combined with $q>p$, forces $q=p+1$.

Since $p,q$ are primes, $p = 2$, $q=3$.

player3236
  • 16,413