While thinking about a research question, we came across the following problem, where $N$ and $K$ are parameters:
What are the total number of permutations of the first $N$ natural numbers, where each number $i$ occupies a position in the interval $[i, (i+K-1)\pmod N]$?
Let us represent the number of permutations by $D(N,K)$.
As an example, for $D(10, 5)$, the number $1$ can occupy positions $1, 2, 3, 4, 5$, and the number $8$ can occupy positions $8, 9, 10, 1, 2$.
I would appreciate any directions to solve the general problem.