hi, what is the number of strings made of only x, y and z and of length n which do not contain the pattern 'xyz' anywhere in them ?

for the pattern 123 we can use the catalan sequence but what about 'xyz'?

e.g for n = 2 , the number of such strings is 9

thanks.