OFFSET
0,4
COMMENTS
Total number of parts in all compositions of n that are not partitions of n (see example).
EXAMPLE
For n = 4 the table shows both the compositions and the partitions of 4. There are three compositions of 4 that are not partitions of 4.
----------------------------------------------------
Compositions Partitions Number of parts
----------------------------------------------------
[1, 1, 1, 1] = [1, 1, 1, 1]
[2, 1, 1] = [2, 1, 1]
[1, 2, 1] 3
[3, 1] = [3, 1]
[1, 1, 2] 3
[2, 2] = [2, 2]
[1, 3] 2
[4] = [4]
----------------------------------------------------
Total 8
.
A partition of a positive integer n is any nonincreasing sequence of positive integers which sum to n, ence the compositions of 4 that are not partitions of 4 are [1, 2, 1], [1, 1, 2] and [1, 3]. The total number of parts of these compositions is 3 + 3 + 2 = 8. On the other hand the total number of parts in all compositions of 4 is A001792(4-1) = 20, and the total number of parts in all partitions of 4 is A006128(4) = 12, so a(4) = 20 - 12 = 8.
CROSSREFS
KEYWORD
nonn
AUTHOR
Omar E. Pol, Oct 14 2013
STATUS
approved