TITLE: $|G|=p^n$, $Z(G)=\langle w\rangle$, $Z(G)\subseteq$ a maximal subgroup; then $\exists f\in \operatorname{Aut}(G)\ , k\ne1\pmod p$ s.t. $ f(w)=w^k$?
QUESTION [5 upvotes]: Let $G$ be a finite $p$-group , let $Z(G)=\langle w\rangle$, suppose there exist a maximal subgroup of $G$ containing $Z(G)$; then does there exist $f\in \operatorname{Aut}(G)$ such that $f(w)=w^k$ for some integer $k \ne1\pmod p$?

REPLY [5 votes]: No.
If $p=2$ then $f$ being an automorphism with $f(w)=w^k$ forces $k\equiv 1\bmod 2$.