Combinatorics, how many ways? You have 7 different integers, $a_1 < a_2 < ... < a_7$ where:
$a_{i+1}-a_i \geq 2, i = 1, 2, ..., 6$.
How many ways can the numbers be taken from the set with integers from 1 to 50.
I've been trying to solve this somehow but can't think of something.
One of the solutions is to replace the numbers with zeroes and ones. You then get 43 zeroes and 7 ones, where the ones cannot be beside one another. The answer is then ${44 \choose 7}$. 
However, another solution gets ${44 \choose 37}$, I know the answers are the same but I would like to know how to get to that one.
Thanks!
 A: The condition $a_1 < a_2 < \ldots < a_7$ where $a_{i + 1} - a_i \geq 2$, $i = 1, 2, \ldots, 6$ means that no two of the seven integers selected from the set of the first $50$ positive integers are consecutive.
Method 1:  We line up $43$ blue balls, leaving spaces between successive balls and at the ends of the row in which to insert green balls.  There are $43 - 1 = 42$ spaces between successive blue balls and two spaces at the ends of the row for a total of $44$ gaps.  We place a green ball in seven of these spaces, then number the balls from left to right.  The numbers on the green balls are the desired subset of $\{1, 2, 3, \ldots, 50\}$ in which no two of the numbers are consecutive.  They can be selected in 
$$\binom{44}{7}$$ 
ways.
Method 2:  We reduce the problem to solving an equation in the non-negative integers.
Let $a_1, a_2, \ldots, a_7$ be the numbers in the desired subset.  Define 
\begin{align*}
x_1 & = a_1\\
x_k & = a_k - a_{k - 1}, 2 \leq k \leq 7\\
x_8 & = 50 - a_k
\end{align*}
Then
$$x_1 + x_2 + x_3 + x_4 + x_5 + x_6 + x_7 + x_8 = 50 \tag{1}$$
Notice that $x_1 \geq 1$.  The condition that $a_{i + 1} - a_i \geq 2$ for $1 \leq i \leq 6$ is equivalent to the condition that $x_k = a_k - a_{k - 1} \geq 2$ for $2 \leq k \leq 7$.  Also, $x_8 \geq 0$.  Define 
\begin{align*}
y_1 & = x_1 - 1\\
y_k & = x_k - 2, 2 \leq k \leq 7\\
y_8 & = x_8
\end{align*}
Then each $y_k$ is a non-negative integer.  If we substitute $y_k + 1$ for $x_1$, $y_k + 2$ for $x_k$ if $2 \leq k \leq 7$, and $y_8$ for $x_8$ in equation 1 we obtain
\begin{align*}
y_1 + 1 + y_2 + 2 + y_3 + 2 + y_4 + 2 + y_5 + 2 + y_6 + 2 + y_7 + 2 + y_8 & = 50\\
y_1 + y_2 + y_3 + y_4 + y_5 + y_6 + y_7 + y_8 & = 37 \tag{2}
\end{align*}
Equation 2 is an equation in the non-negative integers.  A particular solution corresponds to the placement of seven addition signs in a row of $37$ ones.  For instance, 
$$1 1 1 1 1 1 1 + 1 1 1 1 + 1 1 1 1 1 1 + + 1 1 1 1 1 1 1 1 1 + 1 1 1 + 1 1 1 1 1 1 + 1 1$$
corresponds to the solution $y_1 = 7$, $y_2 = 4$, $y_3 = 6$, $y_4 = 0$, $y_5 = 9$, $y_6 = 3$, $y_7 = 6$, and $y_8 = 2$.  Thus, the number of solutions of equation 2 is the number of ways we can place seven addition signs in a row of $37$ ones, which is 
$$\binom{37 + 7}{7} = \binom{44}{7}$$
since we must choose which seven of the $44$ symbols ($37$ ones and seven addition signs) will be addition signs.  Alternatively, the number of solutions of equation 2 is 
$$\binom{37 + 7}{7} = \binom{44}{37}$$
since we must choose which $37$ of the $44$ symbols will be ones.
