I am trying to find the formula for the number $f(n,k)$ which is defined as the number of $k$-subsets of $[n]$ in which no two elements are consecutive numbers in $[n]$.
From the simple thinking I had made up following recursion:
$$f(n,k) = f(n-1,k) + f(n-2, k-1) $$
This is true since I can construct without last element of $[n]$ then make up $k$-subsets, then otherwise must contain the last element of $[n]$ then construct remaining $k-1$ elements among $[n-2]$ since with the last one, I can't use $n-1$.
However, I had never learned any techniques regarding changing those recursion into a well-summarized formula in terms of $n$ and $k$.
Any guidance would be appreciate.
$$ f(n,k)=f(n-1,k)+f(n-2,k-1) \\ f(n-1,k)=f(n-2,k)+f(n-3,k-1) \\ f(n-2,k)=f(n-3,k)+f(n-4,k-1) \\ ... \\ f(2,k)=f(1,k)+f(0,k-1) $$ We sum all expressions : $$ f(n,k)+\sum_{p=2}^{n-1} f(p,k) = f(1,k)+\sum_{p=2}^{n-1}f(p,k) + \sum_{p=0}^{n-2} f(p,k-1) $$ We can cancel 2 sumes : $$ f(n,k) = f(1,k)+ \sum_{p=0}^{n-2} f(p,k-1) $$ This can help a little bit ? Daniel