Came across this question in The Art and Craft of Problem Solving.
Question: Let $p$ be a prime. Show that if $x^k\equiv1 \pmod{p}$ for all nonzero $x$, then $p-1$ divides $k$.
I know that if $k>(p-1)$, then can use Fermat's Little Theorem to 'reduce' to $k\leq(p-1)$. Then since a primitive root exists, there is some $a$ with ord(a) $=p-1$. But the existence of primitive root needs a bit of group theory, and I am wondering if there is a more elementary solution?
My question: Is there alternative ways of solving this question, preferably a more elementary way.
I know there is a similar question here but I think the answer posted has mistakes. Let p be a prime and k a positive integer such that $a^k$mod p = a mod p for all integers a. Prove that p - 1 divides k - 1.
But the existence of primitive root needs a bit of group theoryWith only number theory you can do it. In group theory we usually apply concept of number theory instead! – tarit goswami Aug 29 '18 at 05:08