# Order of an element in the group $(\mathbb{Z}/(p^{n}-1)\mathbb{Z})^{\times}$

For p a prime and n a positive integer, consider the group of units, $(\mathbb{Z}/(p^{n}-1)\mathbb{Z})^{\times}$. How can I go about to find the order of $\bar{p}$?

-
@Zev, $p^{n}=1$, but how do I know this is the order of p? –  Edison Sep 28 '11 at 1:58
I've made my comment into an answer. –  Zev Chonoles Sep 28 '11 at 2:06
Clearly, $p^n\equiv 1\bmod (p^n-1)$, so the order of $p$ is $\leq n$. But if $p^k\equiv 1\bmod (p^n-1)$, then $$(p^n-1)\mid (p^k-1)$$ and if $k<n$ then $p^k-1<p^n-1$, so this is impossible. Therefore the order must be precisely $n$.
@Zev, so when you write $p^{k}= 1 mod (p^{n}-1)$ you are assuming that $k>n$, but in your conclusion you assume $k<n$? I think I am misunderstanding something. –  Edison Sep 28 '11 at 3:53
@El G: I demonstrate that $p^k\equiv 1\bmod (p^n-1)\implies k\geq n$, using a proof by contradiction (if we had $k<n$, we would get the contradiction that $p^n-1\leq p^k-1$ and $p^k-1<p^n-1$). –  Zev Chonoles Sep 28 '11 at 4:01