For , let count the number of ternary strings of length that contain no consecutive s. We find that . For a given , we then determine the following for these ternary strings:
(1)the number of s, s, and s;(2)the number of runs;(3) the number of rises, levels, and descents; and
(4)the sum obtained when these strings are considered as base integers.
Following this, we consider the special case for those ternary strings (among the strings we first considered) that are palindromes, and determine formulas comparable to those in (1) – (4) above for this special case.