Let n be the coefficient of x7 in the expansion of P(x)=(1−x−x2+x3)6, where x is a real variable. A direct multinomial expansion of P(x) is long. A shorter route is to first write the cubic 1−x−x2+x3 as a product of simpler binomial factors. What is the value of n?