Problem: Define a ternary string as a string which contains only 1's, 2's, and 3's.
Construct a recurrence relation to represent the number ternary strings of length n
free of double digits. Provide a recurrence relation which models the counting
problem, and then solve it.