Select sequence without “ABCD”

algorithmscombinatoricspermutations

There are an infinite number of coupons bearing one of the letters A,B,C,D. Find the number of ways for selecting $10$ of these coupons so that there shouldn't be sequence of "ABCD", which means after selecting a 'A' coupon and an 'B' and a "C" coupon you cannot select a 'D' coupon immediately.

I tried like first all possible combination equals $4^{10}$ and then considered sequence "ABCD" together by means $4$ consecutive places are fixed so,total available positions reduce to $7$. In $7$ ways we can place "ABCD" and then remaining $6$ places as selecting any number out of $4$, which equals $4^6$. But it does not work. Looking for kind help.

Best Answer

As I said in the comments, you need to adjust for the double counting by adding back the sequences containg two copies of $ABCD$. You can place these two copies in $6$ different ways and choose the two remaining numbers, thus you have $6\cdot 4^2$ such sequences. Hence the total number should be $$4^{10}-7\cdot 4^6+6\cdot 4^2.$$