login
A356692
Pascal-like triangle, where each entry is the sum of the four entries above it starting with 1 at the top.
4
1, 1, 1, 2, 2, 2, 4, 6, 6, 4, 10, 16, 20, 16, 10, 26, 46, 62, 62, 46, 26, 72, 134, 196, 216, 196, 134, 72, 206, 402, 618, 742, 742, 618, 402, 206, 608, 1226, 1968, 2504, 2720, 2504, 1968, 1226, 608, 1834, 3802, 6306, 8418, 9696, 9696, 8418, 6306, 3802, 1834, 5636, 11942, 20360, 28222, 34116, 36228, 34116, 28222, 20360, 11942, 5636
OFFSET
0,4
COMMENTS
Similar in spirit to the regular Pascal triangle, except that here we have T(n,k) = T(n-1,k-2) + T(n-1,k-1) + T(n-1,k) + T(n-1,k+1), with the understanding that T(0,0) is defined to be 1, and T(n,k) is defined as 0 for k<0 and k>n.
T(n,k) is the number of permutations p of [n+1] such that at most one element of {p(1),...,p(i-1)} is between p(i) and p(i+1) for all i <= n and p(n+1) = k+1. T(4,1) = 16: 13542, 14532, 15342, 15432, 31542, 35142, 35412, 41532, 45132, 45312, 51342, 51432, 53142, 53412, 54132, 54312. - Alois P. Heinz, Aug 31 2022
LINKS
FORMULA
T(n,k) = T(n,n-k).
EXAMPLE
T(4,0) = 10 because it is the sum of T(3,-2), T(3,-1), T(3,0), and T(3,1) which gives 0+0+4+6 = 10.
Triangle begins:
1
1 1
2 2 2
4 6 6 4
10 16 20 16 10
26 46 62 62 46 26
...
MAPLE
T:= proc(n, k) option remember; `if`(k<0 or k>n, 0,
`if`(n=0, 1, add(T(n-1, j), j=k-2..k+1)))
end:
seq(seq(T(n, k), k=0..n), n=0..10); # Alois P. Heinz, Aug 28 2022
MATHEMATICA
T[0, 0] = 1; T[n_, k_] := T[n, k] = If[k < 0 || k > n, 0,
T[n - 1, k - 2] + T[n - 1, k - 1] + T[n - 1, k] + T[n - 1, k + 1]];
Table[Table[T[n, k], {k, 0, n}], {n, 0, 10}] // Flatten
CROSSREFS
Row sums give A216837(n+1).
Column k=0 and also main diagonal give A356832.
T(2n,n) gives A356853.
Sequence in context: A328106 A342336 A320908 * A361404 A248781 A236840
KEYWORD
nonn,tabl
AUTHOR
Greg Dresden and Sadek Mohammed, Aug 23 2022
STATUS
approved