I am trying to work out how many treble bets there are for any given number of selections, and for the life of me I can't. A treble consists of 3 different selections in 3 different events. Ie horse a in race 1 horse b in race 2 and horse c in race 3 combine to make the treble abc. I know that if I choose 4 horses in 4 races I have 4 trebles, 5 horses in 5 races equals 10 trebles and 6 equals 20 trebles. But what I need to calculate is the effect of 1 or more non runners. Each treble that has a non runner in it becomes a double ie a,b,nr or a,nr,b becomes a double. A bet with 2 nr in it becomes a single and a bet with 3 nr in it becomes void. For instance 5 selections equals 10 trebles. If 1 of those 5 is a nr then the 10 trebles become 4 trebles and 6 doubles. If there are 2 nr then the 10 trebles become 1 treble 7 doubles and 3 singles and so depending on the number of nr. Can anyone provide a formula please that will calculate the number of trebles doubles singles and voids given N number of selections and X number of nr's.

Many thanks for all and any help.