OFFSET
0,4
COMMENTS
A composition of n is a finite sequence of positive integers summing to n.
LINKS
Eric Weisstein's World of Mathematics, Unimodal Sequence
FORMULA
a(n) = 2*A000009(n) - 1.
EXAMPLE
The a(1) = 1 through a(9) = 15 compositions:
(1) (2) (3) (4) (5) (6) (7) (8) (9)
(1,2) (1,3) (1,4) (1,5) (1,6) (1,7) (1,8)
(2,1) (3,1) (2,3) (2,4) (2,5) (2,6) (2,7)
(3,2) (4,2) (3,4) (3,5) (3,6)
(4,1) (5,1) (4,3) (5,3) (4,5)
(1,2,3) (5,2) (6,2) (5,4)
(3,2,1) (6,1) (7,1) (6,3)
(1,2,4) (1,2,5) (7,2)
(4,2,1) (1,3,4) (8,1)
(4,3,1) (1,2,6)
(5,2,1) (1,3,5)
(2,3,4)
(4,3,2)
(5,3,1)
(6,2,1)
MATHEMATICA
Table[2*PartitionsQ[n]-1, {n, 0, 30}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, May 16 2020
STATUS
approved