OFFSET
0,4
COMMENTS
Sum of all parts of 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 Sum of all parts
----------------------------------------------------
[1, 1, 1, 1] = [1, 1, 1, 1]
[2, 1, 1] = [2, 1, 1]
[1, 2, 1] 4
[3, 1] = [3, 1]
[1, 1, 2] 4
[2, 2] = [2, 2]
[1, 3] 4
[4] = [4]
----------------------------------------------------
Total 12
.
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 sum of all parts of these compositions is 1+3+1+2+1+1+1+2 = 3*4 = 12. On the other hand the sum of all parts in all compositions of 4 is A001787(4) = 32, and the sum of all parts in all partitions of 4 is A066186(4) = 20, so a(4) = 32 - 20 = 12.
CROSSREFS
KEYWORD
nonn
AUTHOR
Omar E. Pol, Oct 14 2013
STATUS
approved