A296662 Table read by rows, the odd rows of A296664, T(n, k) for n >= 0 and 0 <= k <= 2n.
1, 2, 3, 2, 5, 9, 10, 9, 5, 14, 28, 34, 35, 34, 28, 14, 42, 90, 117, 125, 126, 125, 117, 90, 42, 132, 297, 407, 451, 461, 462, 461, 451, 407, 297, 132, 429, 1001, 1430, 1638, 1703, 1715, 1716, 1715, 1703, 1638, 1430, 1001, 429
Offset: 0
Examples
The triangle starts: 0: [ 1] 1: [ 2, 3, 2] 2: [ 5, 9, 10, 9, 5] 3: [ 14, 28, 34, 35, 34, 28, 14] 4: [ 42, 90, 117, 125, 126, 125, 117, 90, 42] 5: [132, 297, 407, 451, 461, 462, 461, 451, 407, 297, 132]
Programs
-
Maple
v := n -> `if`(n=1, 1, 0): B := n -> LinearAlgebra:-ToeplitzMatrix([seq(v(j),j=0..n)], symmetric): seq(convert(ArrayTools:-Diagonal(B(2*n+1)^(2*n+1), 1),list), n=0..6);
-
Mathematica
v[n_] := If[n == 1, 1, 0]; m[n_] := MatrixPower[ToeplitzMatrix[Table[v[k], {k, 0, n}]], n]; d[n_] := Diagonal[m[2 n + 1], 1]; Table[d[n], {n, 0, 6}] // Flatten
-
Sage
def T(n, k): if k > n: b = binomial(2*n+1, k - n - 1) else: b = binomial(2*n+1, n - k - 1) return binomial(2*n+1, n+1) - b for n in (0..6): print([T(n, k) for k in (0..2*n)])
Comments