There are 6 boxes numbered 1, 2,3,4,5 and 6. Each box is to be filled up either with a red or a green ball in such a way that at least 1 box contains a green ball & the boxes containing green balls are consecutively numbered. The total no. of ways in which this can be done is?  Select the correct option.
A) 18 B) 19 C) 21 D) 25 E) 27
If only one of the boxes has a green ball, it can be any of the 6 boxes. So, this can be achieved in 6 ways.   If two of the boxes have green balls and then there are 5 consecutive sets of 2 boxes. 12, 23, 34, 45, 56.   Similarly, if 3 of the boxes have green balls, there will be 4 options.   If 4 boxes have green balls, there will be 3 options.   If 5 boxes have green balls, then there will be 2 options.   If all 6 boxes have green balls, then there will be just 1 options.   Total number of options = 6 + 5 + 4 + 3 + 2 + 1= 
<gadget id="calculator">6 + 5 + 4 + 3 + 2 + 1</gadget>
<output>21</output>
21   21
<result>C</result>
There are 6 boxes numbered 1, 2,3,4,5 and 6. Each box is to be filled up either with a red or a green ball in such a way that at least 1 box contains a green ball & the boxes containing green balls are consecutively numbered. The total no. of ways in which this can be done is?