How many ways to choose $k$ out of $n$ numbers with exactly/at least $m$ consecutive numbers? How many ways to choose $k$ out of $n$ numbers is a standard problem in undergraduate probability theory that has the binomial coefficient as its solution. An example would be lottery games were you have $13983816$ ways to choose $6$ numbers out of $49$.
My question is: How many ways are there to choose $k$ out of $n$ numbers with exactly/at least $m$ consecutive numbers?
An example would be how many ways are there to choose $6$ out of $49$ numbers with exactly/at least $5$ consecutive numbers, e.g. $\{2,3,4,5,6,26\}$? I read that the answer here is $1936$ ways for the "at least"-case.
I would like to have a general formula and if possible a derivation of it. Good references are also welcome. Thank you.

After some further googling I found the following reference which gives a general formula and a derivation:
Lottery combinatorics by McPherson & Hodson
