Skip to main content
3 of 4
added 145 characters in body
Max Alekseyev
  • 34.3k
  • 5
  • 74
  • 152

The claim does not hold. A counterexample is given by $n=14$, $p=134123250258009499$ and correspondingly $$N = 2197475332227227631617 = 193 \cdot 12289 \cdot 926510094425921.$$ It can be easily verified that $$3^{(N-1)/2} \equiv 1 \pmod{N},$$ but $N$ is not prime.


A couple more values of $N$ giving counterexamples: $$300334937065845770469377,\ 80203520301265852381167617.$$

ADDED. Here is a list of 659 of counterexamples that I found.

Max Alekseyev
  • 34.3k
  • 5
  • 74
  • 152