I looked around, and as far as I can tell, I haven't found this question anywhere else on SE, so if I somehow missed it, please pardon me.
I think this is probably a standard result, but I am having trouble proving it nonetheless. Here is the statement I wish to prove:
"Let $A,B \in M_{n \times n}(\mathbb{C})$ (i.e., the set of $n\times n$ matrices over $\mathbb{C}$). If for all $B$ such that $AB=BA$ one has $B \in \text{Span}\{I, A, A^2,\ldots, A^{n-1}\}$, then $A$ has $n$ distinct eigenvalues."
I have tried messing around with the minimal polynomial and the Jordan form. My instinct is to show that the given condition implies that the Jordan blocks are all of size $1 \times 1$ (hence my concern with the minimal polynomial), and that these blocks are distinct. However, I am clearly not seeing the crucial connection here.
Incidentally, I think I have proven the converse.
If you are willing to share any hints/thoughts/solutions, I would be very appreciative of your input.