How many five-digit positive integers can be written using only the digits 1,2 and 3 and do not have two consecutive digits which are both 3 's? (For example, 32322 satisfies these conditions, while 33132 does not.)
(11111, 11112, 11113, 11121, 11122, 11123, 11131, 11132, 11211, 11212, 11213, 11221, 11222, 11223, 11231, 11232, 11311, 11312, 11313, 11321, 11322, 11323, 12111, 12112, 12113, 12121, 12122, 12123, 12131, 12132, 12211, 12212, 12213, 12221, 12222, 12223, 12231, 12232, 12311, 12312, 12313, 12321, 12322, 12323, 13111, 13112, 13113, 13121, 13122, 13123, 13131, 13132, 13211, 13212, 13213, 13221, 13222, 13223, 13231, 13232, 21111, 21112, 21113, 21121, 21122, 21123, 21131, 21132, 21211, 21212, 21213, 21221, 21222, 21223, 21231, 21232, 21311, 21312, 21313, 21321, 21322, 21323, 22111, 22112, 22113, 22121, 22122, 22123, 22131, 22132, 22211, 22212, 22213, 22221, 22222, 22223, 22231, 22232, 22311, 22312, 22313, 22321, 22322, 22323, 23111, 23112, 23113, 23121, 23122, 23123, 23131, 23132, 23211, 23212, 23213, 23221, 23222, 23223, 23231, 23232, 31111, 31112, 31113, 31121, 31122, 31123, 31131, 31132, 31211, 31212, 31213, 31221, 31222, 31223, 31231, 31232, 31311, 31312, 31313, 31321, 31322, 31323, 32111, 32112, 32113, 32121, 32122, 32123, 32131, 32132, 32211, 32212, 32213, 32221, 32222, 32223, 32231, 32232, 32311, 32312, 32313, 32321, 32322, 32323)>>Total == 164 such permutations.