Solution:
The main trick is to look where n is positioned. In that idea let us denote by xn the number of all the straight permutations and by an the number of straight permutations having n on the first or on the last position, i.e. σ(1)=n or σ(n)=n. Also let us denote by bn the difference xn−an and by an′ the number of permutations having n on the first position, and by an′′ the number of permutations having n on the last position. From symmetry we have that 2an′=2an′′=an′+an′′=an, for all n-s. Therefore finding a recurrence relationship for {an}n is equivalent with finding one for {an′}n.
One can simply compute: a2′=1,a3′=2,a4′=4. Suppose that n≥5. We have two possibilities for the second position: if σ(2)=n−1 then we must complete the remaining positions with 3,4,…,n thus the number of ways in which we can do that is an−1′ (because the permutation σ′:{1,2,…,n−1}→{1,2,…,n−1},σ′(k)=σ(k+1), for all k,1≤k≤n−1, is also a straight permutation).
If on the second position we have n−2,σ(2)=n−2, then n−1 can only be in the last position of the permutation or on the third position, i.e. σ(3)=n−1 or σ(n)=n−1. If σ(n)=n−1, then we can only have σ(n−1)=n−3 thus σ(3)=n−4 and so on, thus there is only one permutation of this kind. On the other hand, if σ(3)=n−1 then it follows that σ(4)=n−3 and now we can complete the permutation in an−3′ ways (because the permutation σ′:{1,2,…,n−3}→{1,2,…,n−3},σ′(k)=σ(k+3), for all k, 1≤k≤n−3, is also a straight permutation).
Summing all up we get the recurrence:
an′=an−1′+1+an−3′⇒an=an−1+an−3+2,∀n≥5
The recurrence relationship for {bn} can be obtained by observing that for each straight permutation τ:{1,2,…,n+1}→{1,2,…,n+1} for which 2≤τ−1(n+1)≤n we can obtain a straight permutation σ:{1,2,…,n}→{1,2,…,n} by removing n+1. Indeed n+1 is "surrounded" by n and n−1, so by removing it, n and n−1 become neighbors, and thus the newly formed permutation is indeed straight. Now, if τ−1(n)∈{1,n+1} then the newly formed permutation σ was counted as one of the an-s, minus the two special cases in which n and n−1 are on the first and last positions. If τ−1(n)∈/{1,n+1} then certainly σ was counted with the bn-s. Also, from any straight permutation of n elements, not having n and n−1 in the first and last position, thus n certainly being neighbor with n−1, we can make a straight n+1-element permutation by inserting n+1 between n and n−1.
Therefore we have obtained the following relationship:
bn+1=an−2+bn=xn−2,∀n≥4
From (1) and (2) we get that
xn=xn−1+an−1+an−3,∀n≥5
It is obvious that {xn}n is a "fast" increasing sequence, so we will compute the first terms using the relationships obtained above, which will prove that the number that we are looking for is n=16 :
a2=2x2=3a3=4x3=6a4=8x4=12a5=12x5=22a6=18x6=38a7=28x7=64a8=42x8=104a9=62x9=164a10=92x10=254a11=136x11=388a12=200x12=586a13=294x13=878a14=432x14=1308a15=634x15=1940a16=928x16=2882
Therefore, the smallest positive integer n for which there exist at least 2003 straight permutations is n=16.