If integral matrices $A,B$ commute, is $B = f(A)$, where $f$ is an integer polynomial?

Let $A\in M_n(\mathbb C)$ be a square matrix of order $n$. Suppose that the characteristic polynomial of $A$ equals its minimum polynomial. It is well known that every matrix that commutes with $A$ is a polynomial in $A$.

Suppose that $A$ has integral elements (that is $a_{ij}\in\mathbb Z$) and $B$ is a matrix also with integral elements that commutes with $A$. So, $B$ is of the form

$$B=c_0+c_1A+\cdots +c_kA^k.$$

Can we conclude that $c_i\in\mathbb Z$ for $i=1,\ldots ,k$?

-
I think a rather simple one-dimensional counterexample is with $A = 2$ and $B = 1$ (so $c_0 = 0, c_1 = 1/2$).. Have I understood this correctly? – Cocopuffs Aug 17 '12 at 14:05
Regarding "It is well known that every matrix that commutes with A is a polynomial in A.": Matrix $C = \exp(A) = \sum_{k=0}^\infty \frac{1}{k!} A^k$ commutes with $A$ and is not a polynomial in $A$. – Sasha Aug 17 '12 at 14:07
@Sasha An expression for $C$ which isn't a polynomial doesn't prove that there are no polynomial expressions. You can represent $C$ as a polynomial in $A$ of degree at most $n-1$, see the Cayley-Hamilton theorem. – Cocopuffs Aug 17 '12 at 14:11
Take the matrix $A$ first raw $(1,0)$ second raw $(0,0)$ and the matrx $B$ first raw $(2,0)$ and second raw $(0,0)$. Then they commute. The minimal is equal to the characteristic. and $A= \frac{1}{2} B$ – clark Aug 17 '12 at 14:43
@Zacarias The characteristic polynomial and minimal polynomial are both $t - 2$ in that case. We can take $n > 1$ but the same sort of counterexample will work, as clark pointed out. – Cocopuffs Aug 17 '12 at 15:03

No. For example, let $A$ be a diagonal matrix with entries $a_{kk} = 2k$ and $B$ a diagonal matrix with entries $b_{kk} = k$. Then $A$ and $B$ commute and there is the representation $B = \frac{1}{2}A$. $A$ has the same minimal and characteristic polynomials as all eigenvalues are distinct and nonzero.