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 A181365 #19 May 11 2025 08:58:29 %S A181365 2,6,1,22,2,78,3,1,272,6,2,940,13,2,1,3232,28,2,2,11080,58,3,2,1, %T A181365 37920,118,6,2,2,129648,239,12,2,2,1,443008,484,22,2,2,2,1513248,979, %U A181365 37,3,2,2,1,5168000,1976,60,6,2,2,2,17647552,3980,97,12,2,2,2,1,60258304,8004 %N A181365 Triangle read by rows: T(n,k) is the number of 2-compositions of n having least entry equal to k (n >= 1; 0 <= k <= floor(n/2)). %C A181365 A 2-composition of n is a nonnegative matrix with two rows, such that each column has at least one nonzero entry and whose entries sum up to n. %C A181365 Row n contains 1 + floor(n/2) entries. %H A181365 Alois P. Heinz, <a href="/A181365/b181365.txt">Rows n = 1..200, flattened</a> %H A181365 G. Castiglione, A. Frosini, E. Munarini, A. Restivo and S. Rinaldi, <a href="https://doi.org/10.1016/j.ejc.2006.06.020">Combinatorial aspects of L-convex polyominoes</a>, European J. Combin. 28 (2007), no. 6, 1724-1741. %F A181365 G.f. for 2-compositions with all entries >= k is h(k,z) = (1-z)^2/(1-2*z+z^2-z^(2*k)) if k>0 and h(0,z) = (1-z)^2/(1-4*z+2*z^2) if k=0. %F A181365 G.f. for 2-compositions with least entry k is f(k,z) = h(k,z)-h(k+1,z) (these are the column g.f.'s). %F A181365 G.f.: G(t,z) = f(0,z) + Sum_{k>=1} f(k,z)*t^k. %F A181365 Sum_{k >= 0} T(n,k) = A003480(n). %F A181365 T(n,1) = A181367(n). %F A181365 Sum_{k >= 0} k*T(n,k) = A181366(n). %e A181365 T(4,1) = 3 because we have (1/3), (3/1), and (1,1/1,1) (the 2-compositions are written as (top row / bottom row)). %e A181365 Triangle starts: %e A181365 2; %e A181365 6, 1; %e A181365 22, 2; %e A181365 78, 3, 1; %e A181365 272, 6, 2; %e A181365 940, 13, 2, 1; %p A181365 h := proc (k) if k = 0 then (1-z)^2/(1-4*z+2*z^2) else (1-z)^2/(1-2*z+z^2-z^(2*k)) end if end proc: f := proc (k) options operator, arrow: h(k)-h(k+1) end proc; G := f(0)+sum(f(k)*t^k, k = 1 .. 30): Gser := simplify(series(G, z = 0, 20)): for n to 15 do P[n] := sort(coeff(Gser, z, n)) end do: for n to 15 do seq(coeff(P[n], t, k), k = 0 .. floor((1/2)*n)) end do; # yields sequence in triangular form %p A181365 # second Maple program: %p A181365 A:= proc(n, k) option remember; `if`(n=0, 1, add(add( %p A181365 `if`(i=0 and j=0, 0, A(n-i-j, k)), i=k..n-j), j=k..n)) %p A181365 end: %p A181365 T:= (n, k)-> A(n, k) -A(n, k+1): %p A181365 seq(seq(T(n, k), k=0..n/2), n=1..15); # _Alois P. Heinz_, Mar 16 2014 %t A181365 A[n_, k_] := A[n, k] = If[n == 0, 1, Sum[Sum[If[i == 0 && j == 0, 0, A[n-i-j, k]], {i, k, n-j}], {j, k, n}]]; T[n_, k_] := A[n, k] - A[n, k+1]; Table[Table[T[n, k], {k, 0, n/2}], {n, 1, 15}] // Flatten (* _Jean-François Alcover_, May 28 2015, after _Alois P. Heinz_ *) %Y A181365 Cf. A003480, A181366, A181367. %K A181365 nonn,tabf %O A181365 1,1 %A A181365 _Emeric Deutsch_, Oct 15 2010