OFFSET
0,38
COMMENTS
T(n,k) is the number of integer compositions of n with first part 1, last part k, and all adjacent differences in {-1,1}. - John Tyler Rascoe, Aug 14 2023
LINKS
Seiichi Manyama, Rows n = 0..481, flattened
FORMULA
From John Tyler Rascoe, Aug 14 2023: (Start)
This triangle is T_1(n,k) of the general triangle T_m(n,k) for compositions of this kind with first part m.
T_m(0,0) = T_m(m,m) = 1.
T_m(n,k) = 0 for 0 < n < m or n < k.
T_m(n,0) = 0 for 0 < n. (End)
EXAMPLE
First few rows are:
1;
0, 1;
0, 0;
0, 0, 1;
0, 1, 0;
0, 0, 0;
0, 0, 1, 1;
0, 1, 0, 0;
0, 0, 1, 0;
0, 1, 1, 1;
0, 1, 0, 0, 1;
0, 0, 2, 1, 0;
0, 2, 1, 1, 0.
MATHEMATICA
T[0, 0] = 1; T[_, 0] = 0; T[n_?Positive, k_] /; 0 < k <= Floor[(Sqrt[8n+1] - 1)/2] := T[n, k] = T[n-k, k-1] + T[n-k, k+1]; T[_, _] = 0;
Table[T[n, k], {n, 0, 20}, {k, 0, Floor[(Sqrt[8n+1] - 1)/2]}] // Flatten (* Jean-François Alcover, May 29 2019 *)
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Seiichi Manyama, Sep 05 2017
STATUS
approved