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 A291904 #47 Jan 04 2024 10:57:35 %S A291904 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, %T A291904 1,0,0,2,1,0,0,2,1,1,0,0,1,1,1,1,0,1,3,2,0,0,3,2,1,1,1,0,2,3,2,1,0,0, %U A291904 3,4,3,1,0,0,4,4,3,2,1,0,4,6,4,2,0,0,6,7 %N A291904 Triangle read by rows: T(n,k) = T(n-k,k-1) + T(n-k,k+1) with T(0,0) = 1 for 0 <= k <= A003056(n). %C A291904 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 %H A291904 Seiichi Manyama, <a href="/A291904/b291904.txt">Rows n = 0..481, flattened</a> %F A291904 From _John Tyler Rascoe_, Aug 14 2023: (Start) %F A291904 This triangle is T_1(n,k) of the general triangle T_m(n,k) for compositions of this kind with first part m. %F A291904 T_m(n,k) for 0 < m, 0 <= n, and 0 <= k <= A003056(n+A000217(m-1)). %F A291904 T_m(0,0) = T_m(m,m) = 1. %F A291904 T_m(n,k) = T_m(n-k,k-1) + T_m(n-k,k+1) for m < n and 0 < k <= A003056(n+A000217(m-1)). %F A291904 T_m(n,k) = 0 for 0 < n < m or n < k. %F A291904 T_m(n,0) = 0 for 0 < n. (End) %e A291904 First few rows are: %e A291904 1; %e A291904 0, 1; %e A291904 0, 0; %e A291904 0, 0, 1; %e A291904 0, 1, 0; %e A291904 0, 0, 0; %e A291904 0, 0, 1, 1; %e A291904 0, 1, 0, 0; %e A291904 0, 0, 1, 0; %e A291904 0, 1, 1, 1; %e A291904 0, 1, 0, 0, 1; %e A291904 0, 0, 2, 1, 0; %e A291904 0, 2, 1, 1, 0. %t A291904 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; %t A291904 Table[T[n, k], {n, 0, 20}, {k, 0, Floor[(Sqrt[8n+1] - 1)/2]}] // Flatten (* _Jean-François Alcover_, May 29 2019 *) %Y A291904 Row sums give A291905. %Y A291904 Columns 0-1 give A000007, A227310 (for n>0). %Y A291904 Cf. A008289, A173258, A291895, A291929. %K A291904 nonn,tabf %O A291904 0,38 %A A291904 _Seiichi Manyama_, Sep 05 2017