OFFSET
0,3
COMMENTS
A composition of n is a finite sequence of positive integers summing to n.
LINKS
Giovanni Resta, Table of n, a(n) for n = 0..1000
EXAMPLE
The a(1) = 1 through a(8) = 14 compositions:
(1) (2) (3) (4) (5) (6) (7) (8)
(11) (111) (22) (122) (33) (133) (44)
(211) (311) (222) (322) (233)
(1111) (2111) (411) (511) (422)
(11111) (3111) (1222) (611)
(21111) (4111) (2222)
(111111) (22111) (5111)
(31111) (11222)
(211111) (41111)
(1111111) (122111)
(221111)
(311111)
(2111111)
(11111111)
For example, the composition (1,2,2,1,1,1) has run-lengths (1,2,3), so is counted under a(8).
MATHEMATICA
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], Less@@Length/@Split[#]&]], {n, 0, 15}]
b[n_, lst_, v_] := b[n, lst, v] = If[n == 0, 1, If[n <= lst, 0, Sum[If[k == v, 0, b[n - k pz, pz, k]], {pz, lst + 1, n}, {k, Floor[n/pz]}]]]; a[n_] := b[n, 0, 0]; a /@ Range[0, 50] (* Giovanni Resta, May 18 2020 *)
CROSSREFS
The case of partitions is A100471.
The non-strict version is A332836.
Strictly increasing compositions are A000009.
Unimodal compositions are A001523.
Strict compositions are A032020.
Partitions with strictly increasing run-lengths are A100471.
Partitions with strictly decreasing run-lengths are A100881.
Compositions with equal run-lengths are A329738.
Compositions whose run-lengths are unimodal are A332726.
Compositions with strictly increasing or decreasing run-lengths are A333191.
Numbers with strictly increasing prime multiplicities are A334965.
KEYWORD
nonn
AUTHOR
Gus Wiseman, May 17 2020
EXTENSIONS
Terms a(26) and beyond from Giovanni Resta, May 18 2020
STATUS
approved