A363262 Number of integer compositions of n in which the greatest part appears more than once.
0, 1, 1, 2, 4, 9, 18, 37, 73, 145, 287, 570, 1134, 2264, 4526, 9061, 18152, 36374, 72884, 146011, 292416, 585422, 1171632, 2344136, 4688821, 9376832, 18749169, 37485358, 74939850, 149813328, 299492966, 598729533, 1196987066, 2393137399, 4784846896, 9567357951
Offset: 1
Keywords
Examples
The a(2) = 1 through a(6) = 9 compositions: (11) (111) (22) (122) (33) (1111) (212) (222) (221) (1122) (11111) (1212) (1221) (2112) (2121) (2211) (111111)
Crossrefs
For partitions instead of compositions we have A002865.
The complement is counted by A097979 shifted left.
Row sums of columns k > 1 of A238341.
If the greatest part appears exactly twice we have A243737.
A032020 counts strict compositions.
A261982 counts compositions with some part appearing more than once.
Programs
-
Mathematica
Table[Length[Select[Join@@Permutations /@ IntegerPartitions[n],Count[#,Max@@#]>1&]],{n,15}]
Comments