cp's OEIS Frontend

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.

A238343 Triangle T(n,k) read by rows: T(n,k) is the number of compositions of n with k descents, n>=0, 0<=k<=n.

This page as a plain text file.
%I A238343 #24 Apr 30 2025 14:32:54
%S A238343 1,1,0,2,0,0,3,1,0,0,5,3,0,0,0,7,9,0,0,0,0,11,19,2,0,0,0,0,15,41,8,0,
%T A238343 0,0,0,0,22,77,29,0,0,0,0,0,0,30,142,81,3,0,0,0,0,0,0,42,247,205,18,0,
%U A238343 0,0,0,0,0,0,56,421,469,78,0,0,0,0,0,0,0,0,77,689,1013,264,5,0,0,0,0,0,0,0,0,101,1113,2059,786,37,0,0,0,0,0,0,0,0,0
%N A238343 Triangle T(n,k) read by rows: T(n,k) is the number of compositions of n with k descents, n>=0, 0<=k<=n.
%C A238343 Counting ascents gives the same triangle.
%C A238343 For n > 0, also the number of compositions of n with k + 1 maximal weakly increasing runs. - _Gus Wiseman_, Mar 23 2020
%H A238343 Joerg Arndt and Alois P. Heinz, <a href="/A238343/b238343.txt">Rows n = 0..140, flattened</a>
%F A238343 Sum_{k=0..n} k * T(n,k) = A045883(n-2) for n>=2.
%e A238343 Triangle starts:
%e A238343 00:    1;
%e A238343 01:    1,    0;
%e A238343 02:    2,    0,    0;
%e A238343 03:    3,    1,    0,    0;
%e A238343 04:    5,    3,    0,    0,   0;
%e A238343 05:    7,    9,    0,    0,   0, 0;
%e A238343 06:   11,   19,    2,    0,   0, 0, 0;
%e A238343 07:   15,   41,    8,    0,   0, 0, 0, 0;
%e A238343 08:   22,   77,   29,    0,   0, 0, 0, 0, 0;
%e A238343 09:   30,  142,   81,    3,   0, 0, 0, 0, 0, 0;
%e A238343 10:   42,  247,  205,   18,   0, 0, 0, 0, 0, 0, 0;
%e A238343 11:   56,  421,  469,   78,   0, 0, 0, 0, 0, 0, 0, 0;
%e A238343 12:   77,  689, 1013,  264,   5, 0, 0, 0, 0, 0, 0, 0, 0;
%e A238343 13:  101, 1113, 2059,  786,  37, 0, 0, 0, 0, 0, 0, 0, 0, 0;
%e A238343 14:  135, 1750, 4021, 2097, 189, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
%e A238343 15:  176, 2712, 7558, 5179, 751, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
%e A238343 ...
%e A238343 From _Gus Wiseman_, Mar 23 2020: (Start)
%e A238343 Row n = 5 counts the following compositions:
%e A238343   (5)          (3,2)
%e A238343   (1,4)        (4,1)
%e A238343   (2,3)        (1,3,1)
%e A238343   (1,1,3)      (2,1,2)
%e A238343   (1,2,2)      (2,2,1)
%e A238343   (1,1,1,2)    (3,1,1)
%e A238343   (1,1,1,1,1)  (1,1,2,1)
%e A238343                (1,2,1,1)
%e A238343                (2,1,1,1)
%e A238343 (End)
%p A238343 b:= proc(n, i) option remember; `if`(n=0, 1, expand(
%p A238343        add(b(n-j, j)*`if`(j<i, x, 1), j=1..n)))
%p A238343     end:
%p A238343 T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n, 0)):
%p A238343 seq(T(n), n=0..20);
%t A238343 b[n_, i_] := b[n, i] = If[n == 0, 1, Sum[b[n-j, j]*If[j<i, x, 1], {j, 1, n}]]; T[n_] := Function[{p}, Table[Coefficient[p, x, i], {i, 0, n}]][b[n, 0]]; Table[T[n], {n, 0, 20}] // Flatten (* _Jean-François Alcover_, Jan 08 2015, translated from Maple *)
%t A238343 Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],n==0||Length[Split[#,LessEqual]]==k+1&]],{n,0,9},{k,0,n}] (* _Gus Wiseman_, Mar 23 2020 *)
%Y A238343 Columns k=0-10 give: A000041, A241626, A241627, A241628, A241629, A241630, A241631, A241632, A241633, A241634, A241635.
%Y A238343 T(3n,n) gives A000045(n+1).
%Y A238343 T(3n+1,n) = A136376(n+1).
%Y A238343 Row sums are A011782.
%Y A238343 Compositions by length are A007318.
%Y A238343 The version for co-runs or levels is A106356.
%Y A238343 The case of partitions (instead of compositions) is A133121.
%Y A238343 The version for runs is A238279.
%Y A238343 The version without zeros is A238344.
%Y A238343 The version for weak ascents is A333213.
%Y A238343 Cf. A008284, A045883, A124765, A124766, A332875, A333215.
%K A238343 nonn,tabl
%O A238343 0,4
%A A238343 _Joerg Arndt_ and _Alois P. Heinz_, Feb 25 2014