$n=3, p=2$ then the sum I'm looking for is: $1.2+1.3+2.3$.
Of course this can be easily calculated on a computer. But having a formula would allow me to use it in the derivation of other formulas. So far I've found nothing on the internet.
I have found this nice formula for the sum of all products of arbitrary many distinct integers :
But I would like to be able to separate this into the parts mentioned above. I hope someone can point me in the right direction. Thanks in advance!