How many positive integers satisfy the following three conditions: a) All digits of the number are from the set $\{1,2,3,4,5\}$; b) The absolute value of the difference between any two consecutive digits is $1$; c) The integer has $1994$ digits?
Source: Baltic Way 1994
Tags: absolute value, number theory proposed, number theory
How many positive integers satisfy the following three conditions: a) All digits of the number are from the set $\{1,2,3,4,5\}$; b) The absolute value of the difference between any two consecutive digits is $1$; c) The integer has $1994$ digits?