Another Method: Pascal's Triangle (Challenge problem included)
We can use Pascal's triangle to calculate combinations. For instance, if we need to calculate 5C2, we count down to the 6th row, and find the 3rd entry - 10. If we need to calculate xCy, we count down to the (x + 1)th row, and find the (y + 1)th entry.
For this problem we're choosing from 7 things, so we need one more row. We find rows of the triangle like this:
So the entries in the 7th row will be
1 (6 + 1) (6 + 15) (15 + 20) (20 + 15) (15 + 6) (6 + 1) 1
1 7 21 35 35 21 7 1
We drop the first 1 (the case where none of the bulbs are on, and add the rest of the terms: 7 + 21 + 35 + 35 + 21 + 7 + 1 = 127
This is almost certainly not the best method, but this seems like an opportune moment to mention a few useful facts about Pascal's triangle.
1. The rows in Pascal's triangle are symmetrical. 7 choose 1 = 7 choose 6, 7 choose 2 = 7 choose 5, and 7 choose 3 = 7 choose 4. So, you only need 2(7C1) + 2(7C2) + 2(7C3) + 7C7. I know that I'm beating a dead horse, but this solution is an illustration of Pascal's Identity:
n choose r = n choose (n - r)
Which is useful in general. For example, you can use it to solve this problem:
Jane is going on a random walk. At each intersection she will flip a coin to determine which direction to take next. If the coin comes up heads she will walk one block east. If the coin comes up tails she will walk one block north. If Jane walks 9 blocks, what is the probability that she ends up at least 5 blocks north of where she started?
The answer is 1/2 - the challenge is to explain why this is true in as few words as possible.
2. If you use pascal's triangle to find combinations, it's useful to know that the sum of the terms in the nth row of the triangle is 2^(n-1). So, if we're choosing r things from 7 things, the results are in the 8th row of Pascal's triangle, so the sum must be 2^(8-1) = 2^7 = 128, and you subtract the case where none of the bulbs are on. Yet another way to solve the problem...
3. Finally, I can't help mentioning that the first five rows of Pascal's triangle are powers of 11 (actually all the rows are powers of 11, but after row five, you have to tweak things). I admit this is a little out there as far as useful facts go, but what if you were calculating compound interest at 10%. Just for illustration, say you invest $100.
YEAR 1 = $100.00
YEAR 2 = $110.00
YEAR 3 = $121.00
YEAR 4 = $133.10
YEAR 5 = $146.41