We need to find the number of ways of getting a sum of 16 when throwing a die four times.
We need the number of solutions to x1+x2+x3+x4=16 where each xi∈{1,2,3,4,5,6}.
Let yi=xi−1, so 0≤yi≤5. The equation becomes:
y1+y2+y3+y4=16−4=12
Without upper bound constraint: The number of non-negative integer solutions to y1+y2+y3+y4=12 is:
(312+3)=(315)=615×14×13=455
Subtract: at least one yi≥6. If y1≥6, let z1=y1−6≥0. Then z1+y2+y3+y4=6, giving (39)=84 solutions. By symmetry, there are 4 such cases:
(14)×(39)=4×84=336
Add back: at least two yi≥6. If y1≥6 and y2≥6, let z1=y1−6,z2=y2−6. Then z1+z2+y3+y4=0, giving (33)=1 solution. There are (24)=6 such pairs:
(24)×(33)=6×1=6
Three or more yi≥6: This would require the sum to be at least 18, which exceeds 12. So this is impossible.
N=455−336+6=125
The answer is 125.