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. :)