Pleasant Permutations

A sequence of $n$ integers is called a permutation if it contains all integers from $1$ to $n$ exactly once. A permutation $p_1, p_2, ..., p_n$ , is called pleasant if it has no two consecutive elements that differ by $d$.


This is a companion discussion topic for the original entry at https://toph.co/p/pleasant-permutations