%I #21 Oct 23 2023 08:35:32
%S 1,1,1,1,1,1,2,2,1,1,1,3,3,3,3,1,1,1,4,4,6,6,4,4,1,1,1,5,5,10,10,10,
%T 10,5,5,1,1,1,6,6,15,15,20,20,15,15,6,6,1,1,1,7,7,21,21,35,35,35,35,
%U 21,21,7,7,1
%N Triangle read by rows, X^n * [1,0,0,0,...] where X = an infinite tridiagonal matrix with (1,0,1,0,1,...) in the main and subdiagonals and (1,1,1,...) in the subsubdiagonal.
%H G. C. Greubel, <a href="/A140751/b140751.txt">Rows n = 0..50, flattened</a>
%F From _G. C. Greubel_, Oct 23 2023: (Start)
%F Sum_{k=0..n} T(n, k) = A000079(n).
%F Sum_{k=0..2*n-1} T(n, k) = A000918(n+1), n >= 1.
%F Sum_{k=0..2*n} (-1)^k*T(n, k) = 1. (End)
%e First few rows of the triangle are;
%e 1;
%e 1, 1, 1;
%e 1, 1, 2, 2, 1;
%e 1, 1, 3, 3, 3, 3, 1;
%e 1, 1, 4, 4, 6, 6, 4, 4, 1;
%e 1, 1, 5, 5, 10, 10, 10, 10, 5, 5, 1;
%e 1, 1, 6, 6, 15, 15, 20, 20, 15, 15, 6, 6, 1;
%e 1, 1, 7, 7, 21, 21, 35, 35, 35, 35, 21, 21, 7, 7, 1;
%e ...
%t row[n_]:= Append[Table[Binomial[n, k], {k, 0, n-1}, {2}], 1]//Flatten;
%t Table[row[n], {n, 0, 7}]//Flatten (* _Jean-François Alcover_, Aug 02 2019 *)
%o (Sage)
%o @CachedFunction
%o def T(n,k): # Triangle in centered form.
%o if abs(k) > n: return 0
%o if n == k: return 1
%o even = lambda n: 1 if 2.divides(n) else 0
%o odd = lambda n: 1 if 2.divides(n+1) else 0
%o return T(n-1, k-1) + odd(n-k)*T(n-1, k) + even(n-k)*T(n-1, k+1)
%o for n in (0..7): [T(n,k) for k in (-n..n)] # _Peter Luschny_, Nov 22 2013
%o (Magma)
%o A140751:=func< n,k | k mod 2 eq 0 select Binomial(n,Floor(k/2)) else k mod 2 eq 1 select Binomial(n,Floor((k-1)/2)) else 0 >;
%o [A140751(n,k): k in [0..2*n], n in [0..12]]; // _G. C. Greubel_, Oct 23 2023
%Y Cf. A000079, A000918, A007318 (Pascal's triangle), A140750.
%Y Cf. A000225 (row sums), A001405 (central terms).
%K nonn,tabf
%O 0,7
%A _Gary W. Adamson_ & _Roger L. Bagula_, May 26 2008