# How many ternary (0, 1, 2) sequences of length 10 are there without any pair of consecutive digits the same?

How many ternary (0, 1, 2) sequences of length 10 are there without any pair of consecutive digits the same?

Not sure if I understood the question correctly. It's asking for possible 10 digit number with $0, 1, 2$ and no consecutive digits.

My thoughts are if there are 10 spaces then the first space will be $3\choose 1$, second one cannot be the same with the first one so it will have to be $2\choose 1$.

So it will come down to $3\times 2^9$. Can someone correct if I'm wrong ?

• There is no correction necessary - you have done this correctly – Keeran Brabazon Oct 19 '13 at 19:11
• Looks good to me. – Kieran Cooney Oct 19 '13 at 19:11
• I would simply add one thing: "$\ldots$ second one cannot be the same with the first one so it will have to be $2 \choose 1$, and the same holds for the remaining eight." – Théophile Jan 18 '15 at 0:05