I have a pretty simple question that I cannot answer...
Imagine that you have a number of different sets, denoted by $H$, and each set has a list of numbers. For example, let's say that there are 3 sets of numbers, so: $H_{1} = \{1,2,3\}$, $H_{2} = \{1,2\}$, and $H_{3} = \{1\}$.
Now imagine that there is a target number, $x > 0$. If we are only allowed to select one number from each set and add them together (but not all sets have to be used), how many combinations would lead to $x$?
For example, assuming $x = 4$, there are 5 combinations using the sets above that would lead to 4.
Is there a general formula to compute the number of different combinations that can be selected that lead to $x$?
Note that each set of numbers begins at 1.