Newton's identities in Sage
EDIT
I actually need:
$s_k=[c_1s_{k-1}+...+c_{k-1}s_1-kc_k]$ ? could somebody help me to change tobias welch's answer so that it computes $s_k$ instead of $c_k$?
END EDIT
I'm combining netwon's identities with le verrier's algorithm
I need some help coding the following on python.
$c_k=\frac{-1}{k}(s_k+c_1s_{k-1}+c_2s_{k-2}+\dots+c_{k-1}s_1)$
where $s_k=Tr(A^k)$, for some square matrix A, $\forall k=1,2,3,\dots,n$
So, i'd like to type in $c(k)$ and python spits out the value for $c_k$ as defined above.