Number Theory – Prove Lucas’s Converse of Fermat’s Little Theorem

elementary-number-theorymodular arithmetic

Problem:
If $x^{n-1} \equiv 1 \pmod{n}$, and for all divisors $q$ of $n – 1$, $a^{q} \not\equiv 1 \pmod{n}$, then $n$ is prime. $(n > 1)$

I read the proof in the book and it was very straightforward; however, I wonder is there a way to prove it by just using congruence property?

And another related question about power residue:
If we have $a^{n – 1} \equiv 1 \pmod{n}$. Is there any relation between $n – 1$ and $\phi(n)$? Because I thought of $a^{\phi(n)} \equiv 1 \pmod{n}$, when $(a, n) = 1$. I try to think of away to connect these two ideas, but I still cannot see it.
Any idea?

Thanks,

Best Answer

Hint $ $ The hypotheses imply the order $\,k\,$ of $\,x\,$ is a divisor of $\,n-1\,$ but not a proper divisor, so $\, k = n-1.\, $ By here and Euler, $\,n-1\mid \phi(n)\ $ so $\ n-1\, \le\, \phi(n).\, $ This implies $\,n\,$ is prime, by$\ \phi(n) \,\le\, n-\color{red}{2}\ $ for composite $\,n,\,$ by at least $\color{red}2\,$ smaller naturals $1<n\!-\!1$ are noncoprime to $\,n$.

Optimization $ $ We can we can restrict to maximal proper divisors $\,q\,$ using the following.

Order Test $\ \,a\,$ has order $\,n\iff a^n \equiv 1\,$ but $\,a^{n/p} \not\equiv 1\,$ for every prime $\,p\mid n.\,$

Proof $\ (\Leftarrow)\ $ If $\,a\,$ has $\,\color{#c00}{{\rm order}\ k}\,$ then $\,k\mid n\,$ (proof). If $\:k < n\,$ then $\,k\,$ is proper divisor of $\,n\,$ therefore $\,k\,$ arises by deleting at least one prime $\,p\,$ from the prime factorization of $\,n,\,$ hence $\,k\mid n/p,\,$ say $\, kj = n/p,\ $ so $\ a^{n/p} \equiv (\color{#c00}{a^k})^j\equiv \color{#c00}1^j\equiv 1,\,$ contra hypothesis. $\ (\Rightarrow)\ $ Clear.