In bell ringing, successive permutations of n bells are played one after the other. Following one permutation π, the next permutation must be obtained from π by moving the position of each bell by at most one place. For example, for n = 4, the permutation 1234 could be followed by any one of 2134,2143,1324, 1243. Show that if an denotes the number of permutations which could follow 12...n, then an = an-1 + an-2 + 1. Hence find an.
-Have absolutely no idea how to approach this problem, any help is appreciated.
Suppose that $n\ge 3$. There are $a_{n-1}$ permutations that can follow $12\ldots n$ that end in $n$. Alternatively, we can take any legitimate permutation of $12\ldots(n-2)$ and follow it with $n(n-1)$; that’s another $a_{n-2}$ permutations. Can you find the one remaining permutation that can follow $12\ldots n$? HINT: It ends in $n(n-1)$.
Once you’ve established the recurrence with suitable initial conditions, you’re supposed to solve it. If you’ve studied generating functions, you can use that approach to solve it mechanically. If not, I suggest that you write out the first nine terms or so and try to find a simple relationship between them and a known sequence. I’ve added a further hint in the spoiler-protected block below.