TITLE: Proof of the following property about prime numbers
QUESTION [5 upvotes]: Is there a proper proof of the following property: 

Let $p$ be a prime number. The number of invertible elements in $\mathbb{Z}/p^n\mathbb{Z}$ is $(p-1)p^{n-1}$.

REPLY [10 votes]: An element $\overline{a}$ (where $0\leq a \leq n-1)$ of the ring $\mathbb{Z}/n$ is invertible precisely when $a$ is coprime to $n$ by a standard result of elementary number theory. The number of positive integers less than or equal to $n$ which are coprime to $n$ is given by the euler-phi function. 
Hence it suffices to compute $\varphi(p^n)$. You can show that  $\varphi(p^n)=(p-1)p^{n-1}$ by noting that the only postive integers less than or equal to $p^n$ which are not coprime to it are the multiples of $p$ namely $kp$ for $k=1,\dotsc, p^{n-1}$. Hence $$\varphi(p^n)=p^n-p^{n-1}=(p-1)p^{n-1}.$$