well let's look at some small values of n:

first, the empty code (nothing). this is valid as it contains 0 4's, and 0 is an even number.

next code words of length 1, there are 8 of these. of these only 1 is invalid, the code 4. so we have 8^{1}- 1 valid codes.

ok, let's look at code words of length 2. there are 4 cases:

the first digit is 4, the second digit is 4. this is valid (one code).

the first digit is 4, the second digit is not 4. these codes are invalid. there are are 8^{1}- 1 codes of this form.

the first digit is not 4, the second digit is 4. these codes are likewise invalid. there are (8^{1}- 1)(1) codes of this form.

neither digit is 4. these codes are valid. there are (8^{1}- 1)(8^{1}- 1) codes of this form.

adding together the valid codes we get: (8^{1}- 1)(8^{1}- 1) + 1 = 8^{2}- 2(8^{1}) + 1.

that is y_{2}- 6y_{1}= 8^{2}- 2(8^{1}) + 1 - 6(8^{1}) + 6 = 8^{2}- 8(8^{1}) + 7 = 7 = 8^{1}- 1.

let's look at y_{3}. count the 4 cases:

first digit is 4, last two digits are a valid code.

first digit is 4, last two digits are an invalid code. <---these are valid codes.

first digit is not 4, last two digits are a valid code. <---these are valid codes.

first digit is not 4, last two digits are an invalid code.

can you think of a way to generalize this procedure?