Hi.

Could you help me solve the following:

Find the formula (preferably a recurrence relation) for the number of words length n
1)consisting of 0,1,2 where subsequent terms (0,1,2) differ by at most 1.
2) consisting of 0,1,2,3, where 0 and 1 are not next to each other.

Wilhelm.