Pages

Stairsteps

Problem:
There are n stairsteps from the ground to the roof. If a person can take 1, 2 or 3 stairsteps each time, how many possible way for him to go to the roof?

E.g. if n = 4, there are 7 possible ways.
1 - 1, 3
2 - 1, 2, 1
3 - 1, 1, 2
4 - 1, 1, 1, 1
5 - 2, 2
6 - 2, 1, 1
7 - 3, 1

Answer: