0

In an answer to Finding a primitive root of a prime number, Vadim only checks $\,a^{\large s/p_i}\bmod p\,$ to check a primitive root. It works but why it is sufficient just to check only the powers ${s/p_i}$ rather than powers of all divisors of $\phi(p)$?

Bill Dubuque
  • 272,048

1 Answers1

1

It's a special case of the following, which uses the fact that every proper factor of $\,n\,$ divides some maximal proper factor $\,n/p,\,$ where $p$ ranges over the prime factors of $\,n\,$ (an immediate consequence of the Fundamental Theorem of Arithmetic = existence and uniqueness of prime factorizations).

Order Test $\ \,a\,$ has order $\,n\iff a^{\large n} \equiv 1\,$ but $\,a^{\large 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 factor 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^{\large n/p} \equiv (\color{#c00}{a^{\large k}})^{\large j}\equiv \color{#c00}1^{\large j}\equiv 1,\,$ contra hypothesis. $\ (\Rightarrow)\ $ Clear.

Bill Dubuque
  • 272,048
  • "therefore k arises by deleting at least one prime p from the prime factorization of n" can you explain this elaborately? @BillDubuque – Pias Roy Jun 15 '19 at 20:02
  • @Pias Hint: $ $ by FTA a factor of $,n,$ must involve the same primes in $,n,$ to powers no greater than those in $,n.,$ If the factor is proper then some prime must occur to strictly lower power. – Bill Dubuque Jun 15 '19 at 20:12