If you want to be lazier, after finding the generating functions one can plug into sympy to skip the algebra.