Let $\left( \begin{array}{c} {g_1^{(a,b)}}(1) \\ \\ {g_2^{(a,b)}}(1) \\ \\ \vdots \\ \vdots \\ \\ {g_p^{(a,b)}}(1) \\ \end{array} \right)$ be the first column of $C_p^{(a,b)}$. With a simple observation we can see that for computingFrom equation ${(C_p^{(a,b)})}^n$${(C_p^{(a,b)})}^n=C_p^{(a,b)}\cdot {(C_p^{(a,b)})}^{n-1}$ we haveconclude:
$$\left\{ \begin{array}{c} g_1^{(a,b)}(n)=a\cdot (g_1^{(a,b)}(n-1)+g_2^{(a,b)}(n-1)) \\g_i^{(a,b)}(n)=a\cdot g_{i+1}^{(a,b)}(n-1) , 2\le i\le p-1\\g_p^{(a,b)}(n)=b \cdot \sum_1^p g_i^{(a,b)}(n-1) \\ \end{array} \right.$$