How many permutations on a set $[n]$ does there exist such that $$\forall k \in [n]\setminus\left\{1\right\}: \sigma (k) \ne k-1\;\;\;\text{and}\;\;\;\sigma (1) \ne n$$
Where $\sigma (k) \in S_n$.
The question is similar to the derangement problem,and in my opinion the number of such permutations is the same as the number of the derangements on a set,plus if we denote the number of such permutations with $w_n$ on a set $[n]$,then I think it's true and reasonable to write an equivalent for $n!$ such that:
$$n!=\sum_{k=0}^{n}\binom{n}{k}w_{n-k}$$
However I think $w_n=D_n$,but I'm not sure how to find a recurrence relation for $w_n$,I tried the similar argument used for proving $D_n=\left(n-1\right)\left(D_{n-1}+D_{n-2}\right)$,but it seems to be more difficult.
Notice that I used a similar argument ,and not the same argument,since I think the same cannot be used to derive a recurrence relation for $w_k$,I want to know how to find a recurrence for $w_k$ using the similar method used to derive $D_n=\left(n-1\right)\left(D_{n-1}+D_{n-2}\right)$.
Your considerations are correct for me. I suggest a way to conclude the computation of $w_n$ thanks to what we know for $D_n$ and what you wrote.
Denote with $X_n = \{\sigma\in S_n \ | \ \sigma(k)\neq k-1 \pmod{n}\}$ the set you are looking for and $Y_n=\{\sigma\in S_n \ | \ \sigma(k)\neq k \}$ the set of the Derangement problem. Hence $|X_n|=w_n$ and $|Y_n|=D_n$.
Consider the maps \begin{gather} X_n\longrightarrow Y_n, \qquad \sigma\longmapsto (1,2,3,4,...,n)\circ \sigma\\ Y_n\longrightarrow X_n, \qquad \rho\longmapsto (1,2,3,4,...,n)^{-1}\circ \rho \end{gather} Since they are one the inverse of the other, this is a bijection between the two sets and $w_n=D_n$.