I'm trying to work through Dummit & Foote, but I've gotten stuck on the following question:
Let $p$ be an odd prime and let $n$ be a positive integer. Use the binomial theorem to show that $(1+p)^{p^{n-1}} \equiv 1\bmod{p^n}$ but $(1+p)^{p^{n-2}} \not \equiv 1\bmod{p^n}$. Deduce that $1+p$ is an element of order $p^{n-1}$ in the multiplicative group $(\mathbb{Z}/p^n\mathbb{Z})^\times$.
The trouble I'm having is mostly with respect to the first implication, since I'm not completely confident with what I've done so far. I started by letting $m = p^{n-1}$ and $a_i = {m\choose i}/m$. I then ended up with \begin{align*} (1+p)^m = \sum_{k=0}^{m} {m\choose k}p^k &= 1 + {m \choose 1}p + {m \choose 2}p^2 + \cdots + {m \choose m-1}p^{m-1} + p^m\\ &= 1 + mp + a_2mp^2 + a_3mp^3 + \cdots + a_{m-1}mp^{m-1}+ p^m\\ & = 1 + p^n + a_2p^{n+1} + a_3p^{n+2} + \cdots + p^m\\ &= 1 + p^n(1+ a_2p + a_3p^2+ \cdots + p^{m-n})\\ &\equiv 1 \bmod{p^n} \end{align*}
...but based on some numerical tests I did, the $a_i$'s aren't necessarily integers, so this doesn't work. Would someone please point out what I'm missing here?
For the second implication, I can see a clean application of Euler's theorem starts things off. To finish, I'd like to show that no power of $(1+p)$ less than $(1+p)^{p^{n-1}}$ is congruent to $1\bmod{p^n}$, but I'm not sure how knowing the first part plays into this.
Any pointers would be appreciated.