[Solution] When n=1, ϕ and {1} are two alternating sequences, so A(1)=2. When n=2, ϕ,{1},{1,2} are three alternating sequences, so A(2)=3. If {a1,a2,a3,⋯,am} is a non-empty alternating sequence taken from the set {1,2,⋯,n}, then when a1=1,
{a2−1,a3−1,⋯,am−1}
is an alternating sequence taken from the set {1,2,⋯,n−1}. And when a1=1, the non-empty alternating sequence {a1,a2,a3,⋯,am} taken from the set {1,2,⋯,n} corresponds one-to-one with the alternating sequence {a2−1,a3−1,⋯,am−1} taken from the set {1,2,⋯,n−1}, so when a1=1, the non-empty alternating sequence {a1,a2,⋯,am} taken from the set {1,2,⋯,n} has A(n−1) sequences.
When a1⩾3,
{a1−2,a2−2,⋯,am−2}
is a non-empty alternating sequence taken from the set {1,2,⋯,n−2}. And when a1⩾3, the non-empty alternating sequence {a1,a2,⋯,am} taken from the set {1,2,⋯,n} corresponds one-to-one with the non-empty alternating sequence {a1−2,a2−2,⋯,am−2} taken from the set {1,2,⋯,n−2}. So, when a1⩾3, the non-empty alternating sequence {a1,a2,⋯,am} taken from the set {1,2,⋯,n} has A(n−2)−1 sequences.
From the above discussion, the number of alternating sequences taken from the set {1,2,⋯,n}
A(n)=A(n−1)+(A(n−2)−1)+1
i.e.,
A(n)=A(n−1)+A(n−2)
Using the above equation, we calculate
A(1)=2,A(2)=3,A(3)=A(1)+A(2)=5,
Similarly, we get
A(4)=8,A(8)=55,A(12)=377,A(16)=2584,A(20)=17711.A(5)=13,A(9)=89,A(13)=610,A(17)=4181,A(6)=21,A(10)=144,A(14)=987,A(18)=6765,A(7)=34A(11)=233A(15)=1597A(19)=10946