Newton's identities in Sage
EDIT
I actually need:
sk=[c1sk−1+...+ck−1s1−kck] ? could somebody help me to change tobias welch's answer so that it computes sk instead of ck?
END EDIT
I'm combining netwon's identities with le verrier's algorithm
I need some help coding the following on python.
ck=−1k(sk+c1sk−1+c2sk−2+⋯+ck−1s1)
where sk=Tr(Ak), for some square matrix A, ∀k=1,2,3,…,n
So, i'd like to type in c(k) and python spits out the value for ck as defined above.