OFFSET
0,4
COMMENTS
Let v be the characteristic function of 1 (A063524) and M(n) for n >= 0 the symmetric Toeplitz matrix generated by the initial segment of v, then row n is the main diagonal of M(n)^n if n is even or the diagonal next to the main diagonal if n is odd. Note that the antidiagonals of M(n)^n are the rows of Pascal's triangle A007318.
FORMULA
EXAMPLE
The first few matrices M(n)^n are:
n=0 n=1 n=2 n=3 n=4
|1| |0 1| |1 0 1| |0 2 0 1| |2 0 3 0 1|
|1 0| |0 2 0| |2 0 3 0| |0 5 0 4 0|
|1 0 1| |0 3 0 2| |3 0 6 0 3|
|1 0 2 0| |0 4 0 5 0|
|1 0 3 0 2|
The triangle starts:
0: [ 1]
1: [ 1]
2: [ 1, 2, 1]
3: [ 2, 3, 2]
4: [ 2, 5, 6, 5, 2]
5: [ 5, 9, 10, 9, 5]
6: [ 5, 14, 19, 20, 19, 14, 5]
7: [14, 28, 34, 35, 34, 28, 14]
8: [14, 42, 62, 69, 70, 69, 62, 42, 14]
9: [42, 90, 117, 125, 126, 125, 117, 90, 42]
MAPLE
v := n -> `if`(n=1, 1, 0):
M := n -> LinearAlgebra:-ToeplitzMatrix([seq(v(j), j=0..n)], symmetric):
seq(convert(ArrayTools:-Diagonal(M(n)^n, n mod 2), list), n=0..10);
MATHEMATICA
v[n_] := If[n == 1, 1, 0];
m[n_] := MatrixPower[ToeplitzMatrix[Table[v[k], {k, 0, n}]], n];
d[n_] := If[n == 0, {1}, Diagonal[m[n], Mod[n, 2]]];
Table[d[n], {n, 0, 10}] // Flatten
PROG
(Sage)
def T(n, k):
h, e = n//2, n%2 == 0
a = binomial(n, h) if e else binomial(2*h+1, h+1)
if k > h:
b = binomial(n, k-h-1) if e else binomial(2*h+1, k-h-1)
else:
b = binomial(n, h+k+1) if e else binomial(2*h+1, h-k-1)
return a - b
for n in (0..9): print([T(n, k) for k in (0..2*(n//2))])
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Peter Luschny, Dec 19 2017
STATUS
approved