Generating function approach on relatively easy problem

70 Views Asked by At

How many eight-digit numbers can be formed using digits from set $A=\{0,1,2,3,4,5,6,7\}$, that are divisible by $4$, all digits must be used.

Now, obviously, I know how to solve this problem by just counting, first choose valid last two digits then choose for the rest, but I tried doing this with generating functions and cant really get past all different digits AND divisible by $4$. How do you approach this problem with generating functions, or rather do you even use this method for these problems?

Thanks for help!