I would like to create the following sparse matrix
\begin{equation} A = \begin{pmatrix} a1+b1 t & k-1 & 0 & \ldots &0 \\ a2^{2}+b2^{2} t & a1+b1t & k-2 & \ldots &0 \\ \vdots & \vdots & \vdots & \ddots & \vdots \\ ak-1^{k-1}+bk-1^{k-1} t & ak-2^{k-2}+bk-2^{k-2} t & ak-3^{k-3}+bk-3^{k-3} t & \ldots & 1\\ ak^{k}+bk^{k} t & ak-1^{k-1}+bk-1^{k-1} t & ak-2^{k-2}+bk-2^{k-2} t & \ldots & a1+b1t \\ \end{pmatrix}, \end{equation} where $ai$, $bi$ and $t$ are variables. My current script reads
mat[a_, b_, t_, n_] := Module[{tmp = 0, tmp2 = 0}, Do[
tmp = SparseArray[{Band[{m, 1}] -> a^m + b^m t}, {n, n}];
tmp2 = tmp + tmp2;
, {m, 1, n}]; tmp2]
which keeps $a^{i}+b^{i} t$ on the $i$th lower diagonal of the matrix. How can I introduce variables ai and bi such that I ensure having $ai^{i}+bi^{i} t$ on these diagonals instead of $a^{i}+b^{i} t$?



a[i]instead ofai. $\endgroup$