Compositions with no 2

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

Let C n C_n be the number of compositions of n n with no part equal to 2.

For instance, C 5 = 7 C_5 = 7 because 5 = 5 = 4 + 1 = 3 + 1 + 1 = 1 + 4 = 1 + 3 + 1 = 1 + 1 + 3 = 1 + 1 + 1 + 1 + 1 5=5=4+1=3+1+1=1+4=1+3+1\\=1+1+3=1+1+1+1+1 .

Find C 15 C_{15} .


Inspiration .


The answer is 1897.

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.

1 solution

We generate the compositions of n n without 2 2 ’s recursively by the following process: to any such composition of n 1 n -1 , one can add a 1 1 or increase the last summand by 1 1 .

However, this process needs two corrections.

First, we must separately generate those compositions that end in 3 3 , since they will not be generated by this recursive method. They come from adding a 3 3 to compositions of n 3 n-3 .

Secondly, we must subtract the compositions of n 1 n-1 that initially ended in 1 1 , since they would now end in 2 2 under this process. The number of such compositions corresponds to compositions of length n 2 n-2 .

So, we have C n = 2 C n 1 C n 2 + C n 3 C_n=2C_{n-1}-C_{n-2}+C_{n-3} .

Starting from C 1 = C 2 = 1 ; C 3 = 2 C_1=C_2=1;C_3=2 , we get C 15 = 1897 C_{15}=\boxed{1897} .

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...