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.

A333213 Triangle read by rows where T(n,k) is the number of compositions of n with k adjacent terms that are equal or increasing (weak ascents) n >= 0, 0 <= k <= n.

This page as a plain text file.
%I A333213 #8 Jan 19 2023 22:35:46
%S A333213 1,0,1,0,1,1,0,2,1,1,0,2,4,1,1,0,3,6,5,1,1,0,4,10,10,6,1,1,0,5,17,20,
%T A333213 13,7,1,1,0,6,27,38,31,16,8,1,1,0,8,40,69,67,42,19,9,1,1,0,10,58,123,
%U A333213 132,101,54,22,10,1,1
%N A333213 Triangle read by rows where T(n,k) is the number of compositions of n with k adjacent terms that are equal or increasing (weak ascents) n >= 0, 0 <= k <= n.
%C A333213 A composition of n is a finite sequence of positive integers summing to n.
%C A333213 Also the number of compositions of n with k + 1 maximal strictly decreasing subsequences.
%C A333213 Also the number of compositions of n with k adjacent terms that are equal or decreasing (weak descents).
%H A333213 Andrew Howroyd, <a href="/A333213/b333213.txt">Table of n, a(n) for n = 0..1325</a> (rows 0..50)
%e A333213 Triangle begins:
%e A333213    1
%e A333213    0   1
%e A333213    0   1   1
%e A333213    0   2   1   1
%e A333213    0   2   4   1   1
%e A333213    0   3   6   5   1   1
%e A333213    0   4  10  10   6   1   1
%e A333213    0   5  17  20  13   7   1   1
%e A333213    0   6  27  38  31  16   8   1   1
%e A333213    0   8  40  69  67  42  19   9   1   1
%e A333213    0  10  58 123 132 101  54  22  10   1   1
%e A333213    0  12  86 202 262 218 139  67  25  11   1   1
%e A333213    0  15 121 332 484 467 324 182  81  28  12   1   1
%e A333213 Row n = 6 counts the following compositions:
%e A333213   (6)    (15)    (114)   (1113)   (11112)  (111111)
%e A333213   (42)   (24)    (123)   (1122)
%e A333213   (51)   (33)    (222)   (11121)
%e A333213   (321)  (132)   (1131)  (11211)
%e A333213          (141)   (1212)  (12111)
%e A333213          (213)   (1221)  (21111)
%e A333213          (231)   (1311)
%e A333213          (312)   (2112)
%e A333213          (411)   (2211)
%e A333213          (2121)  (3111)
%t A333213 Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Length[Split[#,#1>#2&]]==k&]],{n,0,12},{k,0,n}]
%o A333213 (PARI) T(n)={my(M=matrix(n+1, n+1)); M[1,1]=x; for(n=1, n, for(k=1, n, M[1+n,1+k] = M[1+n,1+k-1] + x*M[1+n-k, 1+n-k] + (1-x)*M[1+n-k, 1+min(k-1, n-k)])); M[1,1]=1; vector(n+1, i, Vecrev(M[i,i]))}
%o A333213 { my(A=T(12)); for(i=1, #A, print(A[i])) } \\ _Andrew Howroyd_, Jan 19 2023
%Y A333213 Compositions by length are A007318.
%Y A333213 The case of reversed partitions (instead of compositions) is A008284.
%Y A333213 The version counting equal adjacencies is A106356.
%Y A333213 The case of partitions (instead of compositions) is A133121.
%Y A333213 The version counting unequal adjacencies is A238279.
%Y A333213 The strict/strong version is A238343.
%Y A333213 Cf. A072704, A107429, A124764, A124769, A329744, A332875, A333230.
%K A333213 nonn,tabl
%O A333213 0,8
%A A333213 _Gus Wiseman_, Mar 14 2020