Permutation without consecutive numbers, such as 1,2 or 5,4?
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
There's not that many cases, we could draw a decision tree:
By symmetry, starting with either $1$ or $5$ results in the same number of sequences. Similarly starting with either $31$ or $35$ results in the same number of sequences. So for the seven permutations we found above, we apply the permutation $(15)(24)$ to obtain its "partner".
Hint: Split into cases on the position of the number $3$.