## Sum of the elements of a power of matrix

Hi,

Suppose $A=(a_{ij})$ is a symmetric positive-definite matrix. The sum of the elements of $A^m$ can be found as: $S=\sum_{k_1,\ldots,k_{m+1}}a_{k_1k_2}\cdot\ldots\c dot a_{k_mk_{m+1}}$.
I need to know if $$S=\sum_{k_1,\ldots,k_m}a_{k_1k_2}\cdot\ldots\cdot a_{k_{m-1}k_m}a_{k_mk_m}+2\sum_{k_1,\ldots,k_m}a_{k_1k_2}\ cdot\ldots\cdot a_{k_{m-1}k_m}\sum_{k_{m+1}=1}^{k_m-1}a_{k_mk_{m+1}}$$.