OFFSET
0,3
COMMENTS
a(n) = A000041(n) + A000009(n) - 1 where A000041 is the partition numbers and A000009 is the number of partitions into distinct parts.
From Gus Wiseman, Oct 14 2020: (Start)
Also the number of compositions of n that are either strictly increasing or weakly decreasing. For example, the a(1) = 1 through a(6) = 14 compositions are:
(1) (2) (3) (4) (5) (6)
(11) (12) (13) (14) (15)
(21) (22) (23) (24)
(111) (31) (32) (33)
(211) (41) (42)
(1111) (221) (51)
(311) (123)
(2111) (222)
(11111) (321)
(411)
(2211)
(3111)
(21111)
(111111)
A007997 counts only compositions of length 3.
A329398 appears to be the weakly increasing version.
A333147 is the strictly decreasing version.
A337482 counts the complement.
(End)
EXAMPLE
a(4) = 6 because the 6 classes can be represented by: 4, 3+1, 1+3, 2+2, 2+1+1, 1+1+1+1.
MATHEMATICA
nn=50; p=CoefficientList[Series[Product[1/(1-x^i), {i, 1, nn}], {x, 0, nn}], x]; d= CoefficientList[Series[Sum[Product[x^i/(1-x^i), {i, 1, k}], {k, 0, nn}], {x, 0, nn}], x]; p+d-1
(* second program *)
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], Less@@#||GreaterEqual@@#&]], {n, 0, 15}] (* Gus Wiseman, Oct 14 2020 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Geoffrey Critzer, Oct 17 2012
STATUS
approved