Proving $S(n,n-2) = \frac{n(n-1)(n-2)(3n-5)}{24}.$ I have to prove
$$S(n,n-2) = \frac{n(n-1)(n-2)(3n-5)}{24},$$
for Stirling numbers of the second kind.
I want to show it via induction on $n$ as he did on this problem: Induction with Stirling numbers of the second kind (3 "bins")
Recursion for stirling numbers of the second kind:
$$S(n,k)=\begin{cases}
&0 & n < k\\
&1 &n=k=0 \\
&0 &n  \in \mathbb{N}       , k =0 \\
&0 &n=0, k \in  \mathbb{N}
\end{cases}$$
Here are my thoughts:
definition: $n > k,   n,k \in\Bbb N,$ so for
$n\geq3,$ we have the base case for $n=3$
\begin{align*}
S(3,1) &= S(2,0) + S(2,1)\\
&=0 + S(1,0) + S(1,1) \\
&=0 +0+S(0,0)+S(0,1)\\
&=1\\
\end{align*}
Thus for $n=3$ our equation holds.
Inductive Step. Let's assume $n\geq 3$ and $S(n,n-2) = \frac{n(n-1)(n-2)(3n-5)}{24}.$
Then by the recurrence relation of Stirling numbers of the second kind observe that 
\begin{align*}
S(n+1,n-1) &= S(n,n-2) + (n-1)S(n,n-1)\\
&= \frac{n(n-1)(n-2)(3n-5)}{24}+ (n-1)S(n,n-1)
\end{align*}
Now, I don’t know how to go on.
It's analogous to this: Induction with Stirling numbers of the second kind (3 "bins")
But I don’t know how he gets from $S(k,2)$ to $2^{k-1}-1$.
 A: *

*"But I don’t know how he gets from $S(k,2)$ to +$2^{k-1}-1$."


The trick with these sort of identities is to start from something we do know how to count and then keep adding restrictions until we get to our desired expression.
So as you know, the left hand side counts the number of ways to partition a set of $k$ balls into two non-empty bins.
Now, first let's suppose we allow one of the two bins, $A$ and $B$, to be empty. Then, there are $2^k$ ways of performing such a partition. But now, as per the definition of Stirling numbers, we must remove the condition of allowing the bins to be empty. Since we overcounted here by two bins, it makes sense to remove this from our count, leaving us with $2^k-2$ ways. But now, we wish to remove the notion of ordering, so we divide through by two to compensate for this. This leaves us with $$\frac{2^k-2}{2}=2^{k-1}-1.$$
Do note that this can be proved by induction too if you prefer your proofs to be more algebraic in nature.

Now, let's get to the main question at hand.
We will use the following recurrence relations for the Stirling numbers here:
$$S(n,k)=kS(n-1,k)+S(n-1,k-1),$$ $$S(n,n-1)={n\choose{2}}.$$
The first one can be proved by counting both ways and the second one can be proved by induction.
So now, let's proceed with the question at hand. We will do so by induction.


*

*Base case. $n=3$ gives $S(3,1)=\frac{3\cdot 2\cdot 1\cdot 4}{24}=1$.

*Inductive hypothesis. Assume true for $$S(n,n-2)=\frac{n(n-1)(n-2)(3n-5)}{24}.$$

*Inductive step. Check the $n+1$ case. We get \begin{align}
                S(n+1,n-1)&=S(n,n-2)+(n-1)S(n,n-1)\\
                &=\frac{n(n-1)(n-2)(3n-5)}{24}+(n-1){n\choose{2}}\\
                &=\frac{n(n-1)(n-2)(3n-5)}{24}+\frac{n(n-1)^2}{2}\\
                &=\frac{n(n-1)(n-2)(3n-5)+12n(n-1)^2}{24}\\
                &=\frac{n(n-1)((n-2)(3n-5)+12(n-1))}{24}\\
                &=\frac{n(n-1)(3n^2+n-2)}{24}\\
                &=\frac{n(n-1)(3n-2)(n+1)}{24},
            \end{align}
        as desired.

A: Consider $S(n,n)$ : How many ways can we split the set $[n]$ into $n$ (non empty) blocks ? Each block will contain one element and so there is one way to do this. $S(n,n)=1$
Consider $S(n,n-1)$ : How many ways can we split the set $[n]$ into $n-1$ (non empty) blocks ? Each block will contain one element apart from the last block that will contain $2$ elements, how many ways can we choose two elemnts from $[n]$ ? So $S(n,n-1)=\frac{n(n-1)}{2}.$
Now consider $S(n,n-2)$ there are two possibilities

Add these quantities and you will have the result.
