Problem
COM-B2-M09-P018 A Sum with a Parity Condition
Find the number of 8-tuples \((x_1,\ldots,x_8)\) such that \(0\le x_i\le 5\), \(x_1+\cdots+x_8=30\), and \(x_1+x_2+x_3\) is even.
Set \(y_i=5-x_i\) to count sum \(10\), and track how the parity of the first three variables changes.
Set \(y_i=5-x_i\). Then \(0\le y_i\le 5\) and \(y_1+\cdots+y_8=10\). The condition that \(x_1+x_2+x_3\) is even is equivalent to \(15-(y_1+y_2+y_3)\) being even, so \(y_1+y_2+y_3\) is odd.
Let \(A_3(t)\) be the number of triples from \(0\) to \(5\) with sum \(t\), and let \(A_5(u)\) be the number of 5-tuples from \(0\) to \(5\) with sum \(u\). We need to sum \(A_3(t)A_5(10-t)\) over odd \(t\). Coefficients of \((1+x+\cdots+x^5)^3\) and \((1+x+\cdots+x^5)^5\) give:
\[3\cdot 540+10\cdot 305+21\cdot 126+27\cdot 35+25\cdot 5=8386.\]
The answer is \(8386\).
A strong problem: it requires both reducing the sum by a substitution and applying a parity filter.