Question 951664
how many different strings of length 9 can be formed using only the digits 
{0, 1, 2, 3 }, of the first digit in the string cannot be 0 and the last cannot
be 3
<pre>

Choose the 1st letter any of the 3 ways {1,2,3}, not 0.
Choose the 2nd letter any of the 4 ways {0,1,2,3}.
Choose the 3rd letter any of the 4 ways {0,1,2,3}.
Choose the 4th letter any of the 4 ways {0,1,2,3}.
Choose the 5th letter any of the 4 ways {0,1,2,3}.
Choose the 6th letter any of the 4 ways {0,1,2,3}.
Choose the 7th letter any of the 4 ways {0,1,2,3}.
Choose the 8th letter any of the 4 ways {0,1,2,3}.
Choose the 9th letter any of the 3 ways {0,1,2}, not 3.

3󫶘󫶘󫶘󫶗 = 3<sup>2</sup>4<sup>7</sup> = 147456 different strings.

Edwin</pre>