Say you have a row of 4 lights. Each light-bulb can be turned on/off independently. How many lighting combinations could you come up with?
My research:
Before asking this question I searched the forum to make sure this wasn't a duplicate. I found similar questions, but they had restrictions which I'm not imposing.
For example this question required that a number of lights always be left on, and this question imposed a lighting pattern.
I simply want to know without restrictions how many combinations there could be.
Reading the answers to the linked questions above I learned about Pascals triangle.
Studying the triangle it appeared to me that the number of combinations possible for N (the number of lights in a row) is the sum of all the numbers in the row of pascal's triangle that has the same amount of numbers as n+1.
For example if I had 1 light, there are 2 combinations, on or off.
Pascals second row (the number of lights + 1) the sum of that row adds up to 2. Thus representing the total number of combinations.
Is that correct, and if it is, is there a more formal algorithm to represent this sort of problem without having to draw out a pascal triangle for large data-sets?

