This is pretty simple to do, just multiply each combination of two and then each combination of three
Just use your simple formula for the above, and drag down 30+ rows.

Burrph! to much beer again.