Partitions With No Ones

A partition of is an expression of as a sum of not necessarily distinct positive integers, where the order does not matter. Note that n = n n = n counts as a partition of n n .

Let C n C'_n the number of partitions of n n with no part equal to 1.

For instance, C 8 = 7 C'_8 = 7 because 8 = 8 = 6 + 2 = 5 + 3 = 4 + 4 = 4 + 2 + 2 = 3 + 3 + 2 = 2 + 2 + 2 + 2. 8 = 8 = 6 + 2 = 5 + 3 = 4 + 4 \\ = 4 + 2 + 2 = 3 + 3 + 2 = 2 + 2 + 2 + 2. Find C 50 C'_{50} .


Inspired by Patrick Corn .


The answer is 30701.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Arjen Vreugdenhil
Mar 26, 2016

Each partition of n n can be uniquely written as k + ( partition of n k with no terms greater than k . ) k + (\text{partition of}\ n-k\ \text{with no terms greater than}\ k.) Define therefore C n , k = number of partitions of n without 1 and with no terms greater then k . C'_{n,k} = \text{number of partitions of}\ n\ \text{without 1 and with no terms greater then}\ k. The trick is to generate C n , k C'_{n,k} inductively; clearly, C n = C n , n C'_n = C'_{n,n} .

Some simple observations: C 0 , k = 1 C 1 , k = 0 for all k 1. C'_{0,k} = 1\ \ \ C'_{1,k} = 0\ \ \text{for all}\ k\geq 1. C n , 0 = 0. C n , k = C n , n for all k > n . C'_{n,0} = 0.\ \ \ C'_{n,k} = C'_{n,n}\ \ \text{for all}\ k > n. and the most important one is the recursion formula C n , k = C n , k 1 + C n k , k . C'_{n,k} = C'_{n,k-1} + C'_{n-k,k}. (The partitions of n n with no terms greater than k k consist of the partitions of n n with no terms greater than k 1 k-1 , plus those of the form ( k + k + a partition of n k n-k with no terms greater than k k ).)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
final int mx_n = 50;
int C[][] = new int[mx_n+1][mx_n+1];

for (int i = 0; i <= mx_n; i++) { C[0][i] = 1; C[1][i] = 0; }

for (int n = 2; n <= mx_n; n++) {
    C[n][0] = 0;
    for (int i = 1; i <= n; i++) {
        C[n][i] = C[n][i-1] + C[n-i][i];
    }
    for (int i = n+1; i <= mx_n; i++)
        C[n][i] = C[n][n];
}
System.out.println(C[mx_n][mx_n]);

Output:

1
30701

For more information about the sequence, see this site .

J Joseph
Mar 27, 2016

Partitions of N without any addend of any partition being 1 is

P ( N ) P ( N 1 ) P(N) - P(N-1)

P ( 50 ) P ( 49 ) = 30701 P(50) - P(49) = 30701

Can you give a proof?

Arjen Vreugdenhil - 5 years, 2 months ago

Log in to reply

Just add an 1 in front of each partition of 49 and we get uniquely all partition of 50 beginning with 1

Mathieu Guinin - 5 years, 2 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...