I'm trying to prove the following problem:
(a) Let $G$ be a non-abelian $p$-group with an abelian subgroup of index $p$. Then the number of abelian subgroups of $G$ of index $p$ is either $1$ or $p+1$; in the latter case the center of $G$ has index $p^2$.
(b) A nilpotent group of class $3$ and order $16$ has exactly one cyclic subgroup of index $2$.
I've made some progress towards (a) and tried to use (a) to show (b). But despite thinking about this for a few days I'm missing something and I can't quite finish off my argument. Here is an outline of the main results that I have managed to show; essentially, I think I've shown that for part (a), if there is more than one than there must be at least $p+1$.
Assume that there is more than one abelian subgroup of index $p$. Let $H$ and $K$ be two of them. Then they are both maximal and hence normal in $G$, and then $G=HK$. Then I was able to show that $H \cap K \leq Z(G)$, and then it follows that $Z(G)$ has index $p^2$ (as $G$ is non-abelian).
So now I want to show that there are exactly $p+1$ abelian subgroups of index $p$. Suppose $L$ is a subgroup of $G$ of index $p$ containing $H \cap K$. Then $L \lhd G$. Since $H \cap K \lhd G$ and it has index $p^2$, then $L/(H \cap K)$ is cyclic of order $p$. From this I was able to show that $L$ is abelian.
Now consider $G/(H \cap K)$, which has order $p^2$; however it can't be cyclic since it has two subgroups of order $p$, namely $H/(H \cap K)$ and $K/(H \cap K)$. So $G/(H \cap K) \cong C_p \times C_p$, and it follows that it has $p+1$ subgroups of order $p$. This gives $p+1$ subgroups of $G$ of index $p$. By the above, each of these is abelian.
Now I need to show that there can't be more than $p+1$ such subgroups... but I'm a bit stuck here.
As for part (b), I thought I might be able to use (a) for this, if I can show that there does exist an abelian group of order 8 and it's cyclic. Somehow I need to use the fact that the group is of class 3. I try looking at the upper and lower central series but can't see a way of applying them. I would be grateful for any pointers in the right direction.