Is there any known compact expression for the sum $$S_{k} = \sum_{i=1}^{k} A^{i-1} P Q^{k-i}$$ where $A$, $P$ and $Q$ are respectively $m \times m$, $m \times n$ and $n \times n$ matrices?.

You can assume, if needed, that $A$ and $Q$ are invertible.

The trivial relation $$ AS_{k}-S_{k}Q = A^{k}P - P Q^{k}$$ perhaps provides some clues (fo example it is known that if $A$ and $-Q$ have no common eigenvalues then the last equation has unique solution).