I am not sure how to solve questions like this. I am aware of both recurrence relations and generating functions and how two of these concepts work, but I find it hard to combine them. I would really appreciate if you could explain how to solve it. Thank you!
Three standard six-sided dice are thrown. Write down a closed-form expression for the generating function for $a_n$, the number of ways in which a total of n can be thrown using the three dice, assuming that the dice are distinguishable. You should express the function as compactly as possible, but are not required to identify the coefficients in power series expansion.