cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A229935 Total number of parts in all compositions of n with at least two parts in increasing order.

Original entry on oeis.org

0, 0, 0, 2, 8, 28, 77, 202, 490, 1152, 2624, 5869, 12913, 28116, 60660, 130004, 277065, 587859, 1242540, 2617942, 5500394, 11528284, 24109349, 50321442, 104844426, 218086957, 452963310, 939496802, 1946122511, 4026488387, 8321444573, 17179801049, 35433395265
Offset: 0

Views

Author

Omar E. Pol, Oct 14 2013

Keywords

Comments

Total number of parts in all compositions of n that are not partitions of n (see example).

Examples

			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

Formula

a(n) = A001792(n-1) - A006128(n), n >= 1.