OFFSET
0,3
COMMENTS
A composition of n is a finite sequence of positive integers with sum n.
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..1000
EXAMPLE
The a(1) = 1 through a(6) = 19 compositions:
(1) (2) (3) (4) (5) (6)
(11) (12) (13) (14) (15)
(21) (22) (23) (24)
(111) (31) (32) (33)
(121) (41) (42)
(1111) (131) (51)
(212) (123)
(11111) (132)
(141)
(213)
(222)
(231)
(312)
(321)
(1122)
(1212)
(2121)
(2211)
(111111)
MATHEMATICA
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], SameQ@@Length/@Split[#]&]], {n, 0, 10}]
PROG
(PARI) seq(n)={my(b=Vec(1/(1 - sum(k=1, n, x^k/(1+x^k) + O(x*x^n)))-1)); concat([1], vector(n, k, sumdiv(k, d, b[d])))} \\ Andrew Howroyd, Dec 30 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Nov 20 2019
STATUS
approved