The traditional Pascal's triangle grows by a width of 1 (N=1) each row. I have a modified Pascal's triangle that grows by a width of N each row. Where you sum the N+1 numbers symmetrically above a position in a generated row. The starting row contains (N+1) ones.
I am only concerned about when N is odd such that you can sum above easily. I haven't thought much about when N is even.
Example with N=3 and rows=4:
1 1 1 1
1 2 3 4 3 2 1
1 3 6 10 12 12 10 6 3 1
1 4 10 20 31 40 44 40 31 20 10 4 1
Example with N=5 and rows=3:
1 1 1 1 1 1
1 2 3 4 5 6 5 4 3 2 1
1 3 6 10 15 21 25 27 27 25 21 15 10 6 3 1
This type of modified pascal's triangle is useful for calculating the probability of the sum of rolling R dice with (N+1) faces.
The only way I can figure out how to generate row R is generate row R-1 which requires me to generate the entire triangle from the top. In the traditional pascal's triangle there is a shortcut to generate a row in linear time. But I cannot seem to figure one out for this modified triangle.
If this is confusing or needs more context or another example just comment. :)
You have each row of your "triangle" being the coefficients of $\,P^n\,$ where $\,P\,$ is the polynomial whose coefficients are the first row. In the usual Pascal's triangle, $\,P := 1 + x.\,$ In your first example with $\,N = 3\,$ the polynomial $\,P = 1 + x + x^2 + x^3.\,$ In this special case, $\, P = (1 - x^4) / (1 - x).\,$ Thus, $\, P^n = (1 - x^4)^n (1 - x)^{-n}.\,$ Using binomial coefficients we have $\, (1 - x^4)^n = \sum_{k=0}^n {n \choose k} x^{4k}.$ Also, $ (1 - x)^{-n} = \sum_{k=0}^\infty x^k {n-k+k \choose k}. \,$ Convolve these two power series to get your $\,P^n.\,$ Of course, there are the Multinomial coefficients but I don't see how they would be better to use in this case.