Level
pending

Find the number of 7-digit ternary strings that do not have any 0's next to any 1's. 00200211 and 00211200 are 2 strings to be counted, while 00200120 is a string not to be counted.

(A ternary string is a string consisting of only 0's, 1's, and 2's.)

The answer is 577.

**
This section requires Javascript.
**

You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.

Let $x_y$ represent the number of y-digit ternary strings that ends with $x$ . We find these recursive equations: $0_{n+1}=0_n+2_n,$ $1_{n+1}=1_n+2_n,$ $2_{n+1}=0_n+1_n+2_n.$

We know that $0_1=1_1=2_1=1$ , and we can find the answer: $0_7+1_7+2_7=169+169+169=\boxed{577}.$