Generating function for seven constrained die rolls

78 Views Asked by At

Is it possible to get a generating function when you throw 7 distinct dice that gives a sum of r if the first 3 dice are odd and the last 3 are even . no mention of the 4th (middle die which can be either odd or even )

my answer is

$(x+x^3+x^5)^3\times(x+x^2+x^3+x^4+x^5+x^6)\times(x^2+x^4+x^6)^3$

the middle term being the 4th die.