A composition of a positive integer is an expression of as the sum of only 1s and 2s, where the order matters.
For example,
,
, and
are all possible compositions of 3.
The number of total 1s in all three of these compositions is 5.
Find the total number of 1s in all possible compositions of 20.
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 . x + 2 . y = 2 0 where x is the number of 1 ′ s and y is the number of 2 ′ s
1 . x = 2 0 − 2 . y it can be concluded that x should be even
Total ways= 1 0 0 6 1 0