1.)
don't know if there is a simpler solution but...
S satisfies the property iff all of the following are satisfied:
1.)
2.)
3.)
(for m<n-1 of course)
Therefore 1 and n-1 are definitely in S. The elements 2,3,4...n-2 can be chosen in any way, as long as condition 3) is satisfied.
To gain more insight, we can represent our possible choices in a tree diagram:
Now each path represents some subset. If the path includes m, it means you have chosen m, if it includes m', it means m' is not in the set. e.g the middle path represents {1,2,4}. The construction is such that property 3) is satisfied. This particular tree shows the answer for n=6,5,4,3,2,1. Ie to find the answer for n=6, just count how many there are in the last column: 5. the answer for n=5 is how many there are in the second last column: 3. etc. and the tree can be extended infinitely. Therefore we wish to find how many there are in the (n-2)th column.
Firstly some notation: let
denote the number of elements in the kth column that are dashed ' (in other words, the number of
in our tree). Let
denote the number of non-dashed elements in the kth column (in other words the number of
in our tree).
We have the following recurrence relations:
(because there are
elements in the kth row, and each branches of to an element (k+1) (without a '))
(since only a non-dashed element can branch of to a dashed one)
now define
. clearly we wish to know the sequence f(1),f(2),f(3)... etc. and the recurrences above can be used to find a recurrence for f(k). You can guess that this recurrence is fibonacci-like just from computing a few values using the tree method (i did this manually, trust me it's not that long to work out the first few couple, and you see they are fibonacci).
Now you can just manipulate the recurrences above algebraically to prove this, or you could even use linear algebra I can imagine. Maybe even generating functions.