Expression for the sum of a row in a truncated Pascal's triangle or simplex Here is a truncated Pascal's triangle:

The first s rows are just like a normal Pascal's triangle. From s+1 onward the triangle doesn't grow any more and the columns left of -s and right of +s are taken to be 0. In the example above s=6.
I need to find an expression for the sum of all the terms in row g. For g<=s this is just 2^g as it is a normal Pascal's triangle.
Actually I would like a general formula for Pascal's 5D simplex, but it is easier to explain using Pascal's triangle.
I would be very grateful for some help to get me started. I gather that I may need to study Catalan numbers for that.
 A: The numbers in your array have a combinatorial meaning. Let $T(n,k)$ denote the $k^\text{th}$ number in the $n^\text{th}$ row, with both $k$ and $n$ indexed from $0$. Then $T(n,k)$ is the number of walks on the number line starting at $0$ and ending at $2k-n$, with $n$ steps total, each step moving exactly one unit right or left, where the distance from $0$ is always at most $s$. This can be proven by induction on $n$.
We can also enumerate these walks directly using the reflection principle. I demonstrated this at my other answer in the case when $2k =n$, and stated the formula for general $k$ at my other other answer. Translating that into your problem, we get
$$
\forall k:|2k-n|\le s,\qquad T(n,k) = \sum_{i\in \Bbb Z} (-1)^i \binom{n}{k+i(s+1)}
$$
It turns out that if you take this formula and sum over all $k$ for which $|2k-n|\le s$, then you get a sum of all of the binomial coefficients in Pascal's triangle times a certain sign. Namely,
$$
\text{sum of $n^\text{th}$ row} = \sum_{k=\lceil (n-s)/2\rceil}^{\lfloor (n+s)/2\rfloor} T(n,k)=\sum_{j=0}^n \text{sign}(j,n,s)\binom nj,
$$
Instead of giving a formula for $\text{sign}(n,j,s)$, let me describe it in words. If $\frac{2j-n}{2(s+1)}$ differs by an integer by exactly $\frac12$, then $\text{sign}(n,j,s)=0$. Otherwise, the sign is found by rounding $\frac{2j-n}{2(s+1)}$ to the nearest integer, and using $+1$ if the result is even, $-1$ if the result is odd. Basically, there are blocks of length $s$ which are alternately positive and negative, with a positive block in the center, and with zeroes between in the cases when $n$ and $s$ have opposite parity.
As in your example, suppose $s=6$, and let us use my formula to find the sum of the $n=11^\text{th}$ row.
$$\textstyle
-\binom{11}0-\binom{11}1
+\color{gray}{0\cdot\binom{11}2}
+\binom{11}3+\binom{11}4+\binom{11}5+\binom{11}6+\binom{11}7+\binom{11}8
+\color{gray}{0\cdot\binom{11}9}
-\binom{11}{10}-\binom{11}{11}
$$
You can check that this is indeed equal to $154+329+462+462+329+154$.
