This situation occurred today when I was introduced to this riddle.
There are 4 lilypads. There is a frog on the first lilypad that can hop 1 lilypad to the left or right every turn. After 19 turns, the frog must be on the fourth lilypad. How many ways can the frog do this?
So to clarify, X must equal 4 by incrementing or decrementing 19 times. X must stay within $[1,4]$.
Numbering the lilypads 1 2 3 and 4, an example solution could be
1 2 3 2 3 2 3 2 3 2 3 2 3 2 3 2 3 2 3 4
or
1 2 3 4 3 2 1 2 3 2 3 4 3 2 1 2 3 4 3 4
I understand that in reality, only 17 of the moves matter since the first move is guaranteed to be to the right, and so is the last, but I don't understand how to calculate every possible solution when lilypads 2 and 3 have 2 different possible branches while 1 and 4 only have one possible branch.