![(GDR 3)](/media/m/b/e/c/bec9cf24c09fcc23469eee1de72834c0.png)
Find the number of permutations
![a_1, \cdots, a_n](/media/m/1/0/7/10734aded691530abc3c11e62ad1824e.png)
of the set
![\{1, 2, . . ., n\}](/media/m/6/c/6/6c64706c34a05a7aa7d24464b1636370.png)
such that
![|a_i - a_{i+1}| \neq 1](/media/m/6/c/6/6c634aeae8ef5755c6a91a6d701c1410.png)
for all
![i = 1, 2, . . ., n - 1.](/media/m/7/7/b/77b173bc1c270d7753892a892b4d0924.png)
Find a recurrence formula and evaluate the number of such permutations for
%V0
$(GDR 3)$ Find the number of permutations $a_1, \cdots, a_n$ of the set $\{1, 2, . . ., n\}$ such that $|a_i - a_{i+1}| \neq 1$ for all $i = 1, 2, . . ., n - 1.$ Find a recurrence formula and evaluate the number of such permutations for $n \le 6.$