During my engineering studies we did get some Calculus and Algebra background, but I have a lack of knowledge in other topics such as Combinatorics, Recurrences and Progressions. Therefore I would like to start by apologizing if this doubt is found as trivial or dumb for someone!
Recently, I am facing a problem at my job that involves what I call a tetrahedral progression. I am aware that this name is likely to be wrong, since googling this term will bring me to Pascal's pyramid, but I cannot think of any other name. The subtle difference with Pascal's pyramid is that for an increasing amount of 'layers', the projection of the triangle is recursively inverted.
In order to illustrate this, I prepared the image attached. I calculated the values by hand. Whereas I was able to program a (likely inefficient) script to get the values for a specific number of layers L, I was wondering if there is an analytical expression (something similar to that of Pascal's pyramid or triangle) for this progression.
Image of the proposed progression
The MATLAB script I programmed consists of previously allocating an oversized matrix with 2L+1 rows and columns with a '1' in the middle and the recursive convolution of this matrix with a mask that is iteratively reversed vertically.
For example, if L=2, I create my matrix (M0):
0 0 0 0 0
0 0 0 0 0
0 0 1 0 0
0 0 0 0 0
0 0 0 0 0
And my mask
0 1 0
0 0 0
1 0 1
So that, after the first layer, the resulting matrix is (M1)
0 0 0 0 0
0 0 1 0 0
0 0 0 0 0
0 1 0 1 0
0 0 0 0 0
For the next layer, the mask is reversed
1 0 1
0 0 0
0 1 0
And then applied in the convolution with M1 to obtain M2:
0 1 0 1 0
0 0 0 0 0
1 0 3 0 1
0 0 0 0 0
0 1 0 1 0
However, this script is not efficient at all and I would really appreciate any kind of support in finding an analytical expression (or at least a simpler way) to obtain the generalized case for an L layer.
Thanks in advance