Find the number of ways $(1,2,3,\cdots, N)$ can be arranged (permuted) such that the first $i$ numbers is not a permutation of $(1,2,3,\cdots, i)$ for any $1\leq i < N$.
One way is to solve it using the principle of inclusion exclusion which is doable though I'm not sure if that will directly yield a closed form.
I also observed that $$\text{sol[N]} = N! - \sum_{1}^{N-1} \left\{\text{sol[j]}(N-j)!\right\}$$ where $\text{sol[K]}$ is defined as the solution to the original problem for $N=K$ but I'm not sure how this works. It's just that we get the solution but I'm not it sure how.
Assuming that the question is asking for an explanation why the recurrence relation works, here's an answer. Let $A$ be the set of all permutations of $1 \ldots N$, so that $|A| = N!$. For $1 \leq j \leq N$, define $A_j$ to be the set of permutations $\pi \in A$ such that $\pi$ maps $\{1 \ldots j\}$ onto itself, but $\pi$ does not map $\{1 \ldots i\}$ onto itself for any $i < j$. Clearly $A$ is the disjoint union of the $A_j$, for $j \in \{1 \ldots N\}$, and $sol[N] = |A_N|$.
For $1 \leq j < N$, we know any $\pi \in A_j$ maps $\{1 \ldots j\}$ onto itself. Moreover, since there is no $i<j$ such that $\pi$ maps $\{1 \ldots i\}$ onto itself, the number of choices for the action of $\pi$ on $\{1 \ldots j\}$ is exactly $sol[j]$. Once this is chosen, the action of $\pi$ on $\{j+1 \ldots N\}$ can be chosen arbitrarily, for which there are $(N-(j+1)+1)! = (N-j)!$ choices. Thus $|A_j| = sol[j] (N-j)!$ for $1 \leq j < N$.
Since $A$ is a disjoint union of the $A_j$, we have $|A| = \displaystyle \sum_{j=1}^N |A_j|$, and thus $N! = \displaystyle \sum_{j=1}^{N-1} sol[j](N-j)! + sol[n]$.