problem: 有一段楼梯有n级台阶,规定每一步只能跨一级或两级或三级,要登上第n级台阶有几种不 同的走法? solution: let f(i) denote the number of different methods to climb the stairs. Then f(0) = 1 f(1) = 1 f(2) = 2 f(3) = f(0) + f(1) + f(2) .... f(n) = f(n-3) + f(n-2) + f(n-1) Is this what you talked about?