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.

A332836 Number of compositions of n whose run-lengths are weakly increasing.

This page as a plain text file.
%I A332836 #15 Dec 31 2020 17:00:13
%S A332836 1,1,2,4,7,12,24,40,73,128,230,399,712,1241,2192,3833,6746,11792,
%T A332836 20711,36230,63532,111163,194782,340859,596961,1044748,1829241,
%U A332836 3201427,5604504,9808976,17170112,30051470,52601074,92063629,161140256,282033124,493637137,863982135,1512197655
%N A332836 Number of compositions of n whose run-lengths are weakly increasing.
%C A332836 A composition of n is a finite sequence of positive integers summing to n.
%C A332836 Also compositions whose run-lengths are weakly decreasing.
%H A332836 Andrew Howroyd, <a href="/A332836/b332836.txt">Table of n, a(n) for n = 0..1000</a>
%e A332836 The a(0) = 1 through a(5) = 12 compositions:
%e A332836   ()  (1)  (2)   (3)    (4)     (5)
%e A332836            (11)  (12)   (13)    (14)
%e A332836                  (21)   (22)    (23)
%e A332836                  (111)  (31)    (32)
%e A332836                         (121)   (41)
%e A332836                         (211)   (122)
%e A332836                         (1111)  (131)
%e A332836                                 (212)
%e A332836                                 (311)
%e A332836                                 (1211)
%e A332836                                 (2111)
%e A332836                                 (11111)
%e A332836 For example, the composition (2,3,2,2,1,1,2,2,2) has run-lengths (1,1,2,2,3) so is counted under a(17).
%t A332836 Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],LessEqual@@Length/@Split[#]&]],{n,0,10}]
%o A332836 (PARI)
%o A332836 step(M, m)={my(n=matsize(M)[1]); for(p=m+1, n, my(v=vector((p-1)\m, i, M[p-i*m,i]), s=vecsum(v)); M[p,]+=vector(#M,i,s-if(i<=#v, v[i]))); M}
%o A332836 seq(n)={my(M=matrix(n+1, n, i, j, i==1)); for(m=1, n, M=step(M, m)); M[1,n]=0; vector(n+1, i, vecsum(M[i,]))/(n-1)} \\ _Andrew Howroyd_, Dec 31 2020
%Y A332836 The version for the compositions themselves (not run-lengths) is A000041.
%Y A332836 The case of partitions is A100883.
%Y A332836 The case of unsorted prime signature is A304678, with dual A242031.
%Y A332836 Permitting the run-lengths to be weakly decreasing also gives A332835.
%Y A332836 The complement is counted by A332871.
%Y A332836 Unimodal compositions are A001523.
%Y A332836 Compositions that are not unimodal are A115981.
%Y A332836 Compositions with equal run-lengths are A329738.
%Y A332836 Compositions whose run-lengths are unimodal are A332726.
%Y A332836 Cf. A001462, A072704, A072706, A100882, A181819, A329744, A329766, A332641, A332727, A332745, A332833, A332834.
%K A332836 nonn
%O A332836 0,3
%A A332836 _Gus Wiseman_, Feb 29 2020
%E A332836 Terms a(21) and beyond from _Andrew Howroyd_, Dec 30 2020