If a normal subgroup $N$ of order $p$ ($p$ prime) is contained in a group $G$ of order $p^n$, then $N$ is in the center of $G$.
My attempt: Since $|N|$ is prime $p$, we have $N=\langle a \rangle$. Since $N\lhd G$, we have $gNg^{-1}=N$, $\forall g\in G$. In particular, $gag^{-1}=a^i$ for some $1\leq i\lt p$. So $|a^i|=|gag^{-1}|=|a|$ (second equality is easy to check). Since $\langle a^i\rangle \subseteq \langle a\rangle$ and $|\langle a^i\rangle|= |a^i|=|a|=| \langle a\rangle|$, we have $\langle a^i\rangle = \langle a\rangle$. If $i\gt 1$, then $a\notin \langle a^i\rangle =\langle a\rangle$. We reach contradiction. So $i=1$. Thus $ga=ag$, for all $g\in G$. That is $a\in C(G)$. Hence $N=\langle a\rangle\subseteq C(G)$. Is my proof correct?
In above proof we didn’t use $|G|=p^n$ condition, did we? Here is an alternative proof of above exercise. In my opinion, it is bit complicated proof. There must be some relatively easy solution (using every hypothesis) for this exercise that author had in mind.