Let $A$ and $D$ are $n\times n$ diagnal matrices, and $B$ is an $n\times n$ orthogonal matrix. Is there any efficient way to compute the follow matrix equations easily? $\sum_{i=0}^{k} A^i \cdot B^T \cdot D \cdot B \cdot A^i$