We denote the first $k$ natural numbers (not including 0) by $N_k = \{1,2,3,4,\dots, k\}$.
Consider a length $n$ sequence, $S=(s_1,s_2,s_3,\dots,s_n)$ such that $s_1 \in N_1$, $s_2 \in N_2$ and more generally $s_i \in N_i$.
Let $S_n$ denote the set of such sequences. The number of possible different sequences, $\lvert S_n \rvert$ of length $n$ is $n!$ since there are 1 choices for $s_1$ 2 choices for $s_2$ and so on.
Let $S^2_n$ denote the set of sequences $$ S^2_n = \{ S \in S_n : \text{no number occurs more than twice in $S$} \} $$
For example $S = (1,1,1,2,3) \in S_5$ but not in $S^{2}_5$ since 1 occurs 3 times in $S$.
Question: Calculate $\lvert S_n^2 \rvert$ for each $n$.
I have tried to find a suitable recurrence and by observation it appears that $$ \lvert S_n^2 \rvert = n\lvert S_{n-1}^2 \rvert - (n-2)^2 $$ Unfortunately I do not know how to prove this and help would be greatly appreciated.