OFFSET
0,5
COMMENTS
A composition of n is a finite sequence of positive integers summing to n.
FORMULA
a(n) = 2^(n-1) - 2*A000009(n) + 1, n > 0.
EXAMPLE
The a(2) = 1 through a(5) = 11 compositions:
(11) (111) (22) (113)
(112) (122)
(121) (131)
(211) (212)
(1111) (221)
(311)
(1112)
(1121)
(1211)
(2111)
(11111)
MATHEMATICA
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], !Less@@#&&!Greater@@#&]], {n, 0, 15}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Sep 11 2020
STATUS
approved