Problem:
Let be a positive integer. Call a sequence of positive integers tame if it satisfies
Determine the number of tame permutations of .
Solutions — 2
Solution 1
Solution:
We prove that the number of possibilities is the Fibonacci number by induction . For the base case, observe that there is 1 way to do it for and 2 ways for (all the arrangements work in both cases).
Now suppose this holds true up to and now consider the arrangements for . Where can we place in the sequence? Clearly, it can always go in the final position and placing the rest of the numbers is doable in ways. If it goes in the penultimate position, then the last number must be (since no other number would satisfy ) and placing the rest is doable in ways. We now prove cannot go anywhere else.
Let us place as , . Now consider the smallest element of . This element is at most and so must go in the last position (as it will not satisfy the inequality if it is placed any earlier.) However, we now cannot place anyone in the penultimate position, as the smallest number that can go there is but . You can also obtain a contradiction by trying to place , as the earliest it can appear is as .
Solution 2
Solution:
We prove that the problem is strictly equivalent to writing as a sum of 's and 's, which is a well known recurrence problem left to the reader :)
Consider a permutation that works that is not the identity, and let be the first index such that . It follows that for some . Now, where can we place ? If appears before , it has to be , as otherwise the inequality is not satisfied. But if then we are not able to take any value for , as the smallest number that can go there is but . So either and we have swapped around two consecutive terms, or appears after . In the latter case, just take the largest value in . This value is at least but this immediately contradicts the inequality again. In the former case, the placement of and do not actually affect our ability to place anything afterwards, so we can look at the next index not mapped to itself and conclude it has been swapped with the one immediately following it by the same reasoning, and continue onwards in this manner. Therefore the only changes we can make from the identity permutation are swapping two consecutive values, and this is equivalent to writing as a sum of 's and 's as desired; a 1 is an element mapped to itself and a 2 is a swap of two consecutive elements.