I'm trying to solve this problem.
Let A and B be square n by n matrices. Suppose that for three consecutive integers we have that $(AB)^k=A^kB^k$. Show that $AB=BA$
My thinking: I suppose exists three integers $k,k+1,k+2$ such that $(AB)^k=A^kB^k$, $(AB)^{k+1}=A^{k+1}B^{k+1}$ and $(AB)^{k+2}=A^{k+2}B^{k+2}$ by adding these equalities and substracting common factors I can get
$(AB)^k(I+AB+(AB)^2)=A^k(I+AB+(AB)^2)B^k$, Which I'm trying to figure what it means. I tried some reverse engineering by doing $(AB)^k=(BA)^k$ but that didn't got me too far.
Any hints on how to tackle this problem?
Thanks!