This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A296664 #25 Mar 08 2020 05:00:21 %S A296664 1,1,1,2,1,2,3,2,2,5,6,5,2,5,9,10,9,5,5,14,19,20,19,14,5,14,28,34,35, %T A296664 34,28,14,14,42,62,69,70,69,62,42,14,42,90,117,125,126,125,117,90,42, %U A296664 42,132,207,242,251,252,251,242,207,132,42 %N A296664 Table read by rows, diagonals of powers of Toeplitz matrices generated by the characteristic function of 1, T(n, k) for n >= 0 and 0 <= k <= 2*floor(n/2). %C A296664 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. %F A296664 T(n, 0) = T(n, 2*floor(n/2)) = A208355(n) = A000108(floor((n+1)/2)). %F A296664 T(n, floor(n/2)) = A001405(n). %F A296664 Further formulas can be found in A296662 and A296666 for the cases n odd and n even. %e A296664 The first few matrices M(n)^n are: %e A296664 n=0 n=1 n=2 n=3 n=4 %e A296664 |1| |0 1| |1 0 1| |0 2 0 1| |2 0 3 0 1| %e A296664 |1 0| |0 2 0| |2 0 3 0| |0 5 0 4 0| %e A296664 |1 0 1| |0 3 0 2| |3 0 6 0 3| %e A296664 |1 0 2 0| |0 4 0 5 0| %e A296664 |1 0 3 0 2| %e A296664 The triangle starts: %e A296664 0: [ 1] %e A296664 1: [ 1] %e A296664 2: [ 1, 2, 1] %e A296664 3: [ 2, 3, 2] %e A296664 4: [ 2, 5, 6, 5, 2] %e A296664 5: [ 5, 9, 10, 9, 5] %e A296664 6: [ 5, 14, 19, 20, 19, 14, 5] %e A296664 7: [14, 28, 34, 35, 34, 28, 14] %e A296664 8: [14, 42, 62, 69, 70, 69, 62, 42, 14] %e A296664 9: [42, 90, 117, 125, 126, 125, 117, 90, 42] %p A296664 v := n -> `if`(n=1, 1, 0): %p A296664 M := n -> LinearAlgebra:-ToeplitzMatrix([seq(v(j), j=0..n)], symmetric): %p A296664 seq(convert(ArrayTools:-Diagonal(M(n)^n, n mod 2), list), n=0..10); %t A296664 v[n_] := If[n == 1, 1, 0]; %t A296664 m[n_] := MatrixPower[ToeplitzMatrix[Table[v[k], {k, 0, n}]], n]; %t A296664 d[n_] := If[n == 0, {1}, Diagonal[m[n], Mod[n, 2]]]; %t A296664 Table[d[n], {n, 0, 10}] // Flatten %o A296664 (Sage) %o A296664 def T(n, k): %o A296664 h, e = n//2, n%2 == 0 %o A296664 a = binomial(n, h) if e else binomial(2*h+1, h+1) %o A296664 if k > h: %o A296664 b = binomial(n, k-h-1) if e else binomial(2*h+1, k-h-1) %o A296664 else: %o A296664 b = binomial(n, h+k+1) if e else binomial(2*h+1, h-k-1) %o A296664 return a - b %o A296664 for n in (0..9): print([T(n, k) for k in (0..2*(n//2))]) %Y A296664 Cf. A000108, A001405, A208355, A296663 (row sums), A296662 (odd rows), A296666 (even rows). %K A296664 nonn,tabf %O A296664 0,4 %A A296664 _Peter Luschny_, Dec 19 2017