If $A^k$ commutes with $B$ then $A$ commutes with $B$. Let $A$ and $B$ are two $n \times n$ Complex matrices. Assume that $(A-I)^n=0$ and $A^kB=BA^k$ for some $k \in \mathbb{N}$. Then I want to prove that $AB= BA$.
Clearly $1$ is the only eigen value of $A$ and also $A^k$ and $B$ are simultaneously triangulable. But how do I get down to $A$ to commute with $B$. Any help will be appreciated. Thanks.
 A: Hint. Try to prove that $A$ is a polynomial in $A^k$.
Edit. To prove the hint, you may follow darij grinberg's comment below. I did essentially the same thing, but from a matrix analytic rather than linear algebraic perspective: I considered the primary matrix function $f(X)=(I+X)^{1/k}=\sum_{i=0}^\infty \frac{f^{(i)}(0)}{k!}X^i$ for a nilpotent matrix $X$ associated with the scalar function $f(x)=(1+x)^{1/k}$. Put $X=A^k-I$ and we are done.
Alternatively, the hint can be proved using only Jordan forms, but the argument is much longer.


*

*Let $J$ be the Jordan form of $A$. Since all eigenvalues of $A$ are ones, we may write $J=J_{m_1}\oplus J_{m_2}\oplus\cdots\oplus J_{m_b}$, where $1\le m_1\le m_2\le\cdots\le m_b$ and $J_m$ denotes a Jordan block of size $m$ for the eigenvalue $1$.

*Note that if $r\ge0$ and $m<n$, then $J_m^r$ coincides with the leading principal $m\times m$ submatrix of $J_n^r$. Hence $p(J_m^k)$ coincides with a leading principal submatrix of $p(J_n^k)$ for any polynomial $p$.

*It follows that if $p(J_n^k)=J_n$, then $p(J_m^k)=J_m$ for every $m<n$. This is true in particular when $m\in\{m_1,m_2,\ldots,m_b\}$. Consequently, $p(A^k)=A$.

*Hence the problem boils down to finding a polynomial $p$ such that $p(J_n^k)=J_n$. This should be straightforward and I will leave it to you.

A: If $A$ has only $1$ as eigenvalue then it is invertible (and of the form $I+N$ where $N$ is nilpotent with $N^n=0$). 
$A $ is satisfying also any equation   $(A^i-I)^n=0$ so we can write 
$(A-I)^n=0, (A^2-I)^n=0, \dots (A^k-I)^n=0$. 
Also we can write ${A^k} B(A^k)^{-1}=B$.
In similar fashion 
${A^k} B(A^k)^{-1}=({A^k})^{-1} B(A^k)$ 
${A^{2k}} B =  B(A^{2k})$, etc..
For any natural $m$:
${A^{mk}} B =  B(A^{mk})$
If powers  $(A^k)^m$ could be a basis for expression  of $A$ then commutativity would follow... 
