2026-11-23

Problem — 2026-11-23

Medium

MediumCombinatorics

A child climbs a 1212-step staircase, each move going up exactly 11, 22 or 33 steps, ending exactly on the top step. To stay safe, the child never makes two 33-step moves in a row. How many different sequences of moves are possible?

Enter an integer

Show solution
Let ana_n be the number of valid ways to climb nn steps whose last move is not a 33 (count the empty climb as a0=1a_0=1), and bnb_n those ending in a 33. A 33-move may only follow a non-33 ending, so bn=an−3b_n=a_{n-3}, while an=(an−1+bn−1)+(an−2+bn−2)a_n=(a_{n-1}+b_{n-1})+(a_{n-2}+b_{n-2}). Tabulating (an,bn)(a_n,b_n) for n=1..12n=1..12: (1,0),(2,0),(3,1),(6,1),(11,2),(20,3),(36,6),(65,11),(118,20),(214,36),(388,65),(703,118)(1,0),(2,0),(3,1),(6,1),(11,2),(20,3),(36,6),(65,11),(118,20),(214,36),(388,65),(703,118). Total for 1212 steps: 703+118=821703+118=821.