Let $G$ be a group such that there exists an $i$ such that $G/Z^i(G)$ is cyclic. Does it follow that $G$ is abelian?
This question is a generalization of the well known fact that if $G/Z(G)$ is cyclic then $G$ is abelian. I attempted to prove it for the case $G/Z^2(G)$ but had difficulties. So I suspect this is false, but I do not have a counter-example in hand.
If someone could provide me a counter-example to the claim, or prove it, I'd be appreciative.
By $Z^i(G)$ I am supposing that you mean the $i^{\text{th}}$ term of the upper central series.
Hint: Look up Nilpotent groups, or look at some non-abelian finite $p$-group ($p$-groups are Nilpotent). You need to consider the top term of the upper central series.