Problem

Source: KJMO 2018 p4

Tags: combinatorics, number theory, Diophantine equation



For a positive integer $n$, denote $p(n)$ to be the number of nonnegative integer tuples $(x,y,z,w)$ such that $x+2y+2z+3w=n$. Also, denote $q(n)$ to be the number of nonnegative integer tuples $(a,b,c,d)$ such that (i) $a+b+c+d=n$ (ii) $a \ge b \ge d$ (iii) $a \ge c \ge d$ Prove that for all $n$, $p(n) = q(n)$.