M is the number of six-element subsets that can be chosen from the set of the first 15 positive integers so that at least three of the six numbers are consecutive.

Find M.

The number of subsets with 6 consecutive is 10.

The number of subsets with 5 consecutive (but not six) consecutive are:

12345 = 1*9 choices for the 6th element

11,12,13,14,15 = 1*9

other = 9 strings * 8 choices for the 6th element = 72

Total = 90

The number of subsets with 4 consecutive (but not 5) consecutive are:

1234 = 1*c(10,2) choices for the 5th & 6th element = 45

12,13,14,15 = 1*c(10,2) = 45

other = 10 strings * c(9,2) choices for the 5th & 6th element = 360

Total = 450

The number of subsets with 3 consecutive (but not 4) consecutive are:

123 = 1*c(11,3) choices for the 4th & 5th & 6th element = 165

13,14,15 = 1*c(11,3) = 165

other = 11 strings * c(10,3) choices for the 4th & 5th & 6th element = 1320

But this double counts sets that have two groups of 3. How many are these?

123 + higher set = 9

234 + higher set = 8

etc.

In total, 9 + ... + 1 = 45

Total count = 10+ 90 + 450 + (165 + 165 + 1320 - 55) = **2155**