The series $\displaystyle\sum_{p=1}^{\infty}\mathrm{tr}(A^p)z^p$ Let $A\in\mathcal{M}_n(\mathbb{C})$. For $z\neq0$, how to express the sum of the series 
$$f(z)=\sum_{p=1}^{\infty}\mathrm{tr}(A^p)z^p$$
with the characteristic polynomial $P$ of $A$. Thanks.
 A: First step is to notice that trace is additive, so this can be written as $$\mathrm {tr}\,\left(\sum_{p=0}^\infty (zA)^p\right) = tr((I-zA)^{-1})$$
So let $p(x)=x^n+a_{n-1}x^{n-1}\dots a_0$ is the characteristic polynomial for $I-zA$ then the characteristic polynomial for $(I-zA)^{-1}$ is $x^n + \frac{a_1}{a_0}x^{n-1} + \frac{a_2}{a_0}x^{n-2}\dots + \frac{1}{a_0}$. And the trace of a matrix is the negative of the $x^{n-1}$ coefficient, so if we know the characteristic polynomial for $I-zA$ then the answer we are seeking is $\frac{-a_1}{a_0}$.
But the characteristic polynomial is $$p(x)=\det \left(xI - (I-zA)\right) = (-z)^n \det\left(\frac{1-x}zI-A\right) = (-z)^nq\left(\frac{1-x}z\right)$$ where $q$ is the characteristic poylnomial of $A$.
So, if we are given $q$, we can compute $p(x)=(-z)^nq(\frac{1-x}z)$ and compute $a_1$ and $a_0$ to get our result.
But $a_0=p(0)$ and $a_1=p'(0)$, so we get the formula for the trace:
$$-\frac{a_1}{a_0} = \frac{q'(\frac{1}{z})}{zq(\frac{1}{z})}$$
I think I've got it right. In the case where $A=I$, at least, $q(x)=(x-1)^n$ and $q'(x)=n(x-1)^{n-1}$ and we get $\frac{n}{1-z}$, which is the desired result.
An alternative approach is to show that the the sequence $B_p=\mathrm{tr}(A^p)$ satisfies a linear recurrence.  If the minimum polynomial for $A$ is $x^n+a_{n-1}x^{n-1}+\dots+a_0$ then $$B_{p+n} = -\sum_{i=0}^{n-1} a_i B_{p+i}$$
There is a general approach to finding the generating function for a sequence defined by a linear recurrence.
