Long time no see...

My greetings to all forum users.

I know that if we have$\displaystyle k$ identical sets that each one of them has $\displaystyle n$ objects and we want to pick $k$ objects, one from each set, how many combinations do we have?

The formula is (stars and bars approach):

$\displaystyle CC(n,k)=\dfrac{(n+k-1)!}{k!(n-1)!}$

For example, we have two sets $\displaystyle k=2$ of four $\displaystyle n=4$ (same) primes and we want to find out how many combinations we can get, the answer is:

$\displaystyle CC(n,k)=\dfrac{(4+2-1)!}{2!(4-1)!}=10$

However if we have to pick up from $\displaystyle k$ sets, where every set is a subset of a previous one, how many combinations there are? For example, if we have the following 3 sets and pick up a prime from each one set, how many combinations do we have?

$\displaystyle \{2,3,5,7\}, n1=4, k=1$

$\displaystyle \{2,3\}, n2=2, k=2$

$\displaystyle \{2,3\}, n3=2, k=3$

Is there a compact formula? An explanation, if possible would be thankful.

Thank you very much.