How to find the sum of all entries of a certain matrix I have two matrices $A=\pmatrix{19 &amp; 17\\\ 1&amp; 4}$ and $B=\pmatrix{\sqrt{3} &amp; -1\\\ 1&amp; \sqrt{3}}$. I want to find the sum of all entries of $(ABA^{-1})^{300}$. Where to attack?

I found a good pattern for $B^{2n}$ and can see that $(ABA^{-1})^{300}=AB^{300}A^{-1}$ but it seems not the right way necessarily. Thank you for the hint.
It may help to note that the sum of all elements of $C$ is
$$\pmatrix{1&amp;1}C\pmatrix{1\\1}.$$
Then
$$\pmatrix{1&amp;1}AB^{300}A^{-1}\pmatrix{1\\1}
=\pmatrix{20&amp;21}B^{300}\pmatrix{-13/59\\18/59}
$$
etc.
Note that $$(ABA^{-1})^n = \underbrace{(AB\overbrace{\color{red}{A^{-1}})(\color{red}{A}}^{\text{identity}}B\color{red}{A^{-1}})(\color{red}{A}BA^{-1})\cdots (ABA^{-1})}_{n\text{ times}}$$ so clearly, for any invertible matrix $A$ we have $$(ABA^{-1})^{300} = AB^{300}A^{-1}$$ with the pattern on $B$ the problem is solved.