I examined the response that referred to another question, and I don't see my approach to this problem anywhere in the linked question. This problem is simply a Stars and Bars problem in disguise. For Stars and Bars theory, see
this article and
this article.
Consider the following tableau
---N_1-----N_2-----N_3-----N_4-----N_5-----N_6------
The positions of the $~6~$ numbers are each an element in $~\{1,2,\cdots,49\},~$ where $~N_1 < N_2 < \cdots < N_6.~$ Assuming that the constraint against consecutive positions being chosen by any of the pairs of numbers $~[N_1:N_2], ~\cdots, [N_6:N_7]~$ is ignored, you clearly have that the number of ways of selecting these positions is clearly $~\displaystyle \binom{49}{6}.~$
Stars and Bars would approach this problem, where the constraint against consecutive positions being chosen by any of the pairs of numbers $~[N_1:N_2], ~\cdots, [N_6:N_7]~$ is ignored, as follows:
These $~6~$ positions create $~7~$ islands that represent the island before $~N_1,~$ and the islands after each of $~N_1, \cdots, N_6.~$
Denote the size of these respective islands by the variables $~x_1, ~\cdots, ~x_7.~$ Then, by Stars and Bars theory, the number of ways of selecting these $~6~$ positions, where the constraint against consecutive positions being chosen is ignored, is equal to the number of solutions to
$x_1 + x_2 + \cdots + x_k = n.~$
$x_1, \cdots, x_k \in \Bbb{Z_{\geq 0}}.$
$k = 7, ~n = 49 - 6 = 43.~$
By Stars and Bars theory, the number of solutions is $~\displaystyle \binom{n + [k-1]}{k-1} = \binom{43 + 6}{6} = \binom{49}{6}.$
Stars and Bars theory is easily adapted to include the constraint that no two selected positions are consecutive. This will be true, if and only if each of the variables $~x_2, \cdots, x_6~$ is $~\geq 1.~$
To use basic Stars and Bars theory, against the included constraint, simply employ the change of variables $~y_i = x_i - 1 ~: ~i \in \{2,3,\cdots,6\}.~$
So, the problem has changed to
$x_1 + y_2 + \cdots + y_6 + x_7 = (49 - 6) - 5 = 38.~$
$x_1, x_7 \in \Bbb{Z_{\geq 0}}.$
$y_2, \cdots, y_6 \in \Bbb{Z_{\geq 0}}.$
By Stars and Bars theory, the enumeration is
$~\displaystyle \binom{38 + 6}{6} = \binom{44}{6}.$
By analogy, the enumeration of the broader question of $~k~$ non-consecutive numbers being chosen from $~\{1,2,\cdots,n\},~$ may be approached as follows:
You want the enumeration of the number of solutions to
$x_1 + \cdots + x_{k+1} = (n - k).$
$x_1, x_{k+1} \in \Bbb{Z_{\geq 0}}.$
$x_2, \cdots, x_k \in \Bbb{Z_{\geq 1}}.$
Employing the change of variables $~y_i = x_i - 1 ~: i \in \{2,\cdots,k\},~$ you want the enumeration of the number of solutions to
$x_1 + y_2 + \cdots + y_k + x_{k+1} = (n - k) - (k-1) = (n + 1 - 2k).$
$x_1, x_{k+1} \in \Bbb{Z_{\geq 0}}.$
$y_2, \cdots, y_k \in \Bbb{Z_{\geq 0}}.$
By Stars and Bars theory, the answer to the broader question is therefore $~\displaystyle \binom{[n + 1 - 2k] + [k]}{k} = \binom{n + 1 - k}{k}.$
Note that when $~(n + 1 - 2k) \in \Bbb{Z_{< 0}},~$ then since each of the variables $~x_1, x_{k+1}, y_2, \cdots, y_k~$ is non-negative, the number of solutions will be $~0.$