Problem

Source: 2018 Korean Mathematical Olympiad Problem 2

Tags: combinatorics, counting



For a positive integer $n$, denote $p(n)$ to be the number of nonnegative integer tuples $(x,y,z,w)$ such that $x+y+2z+3w=n-1$. 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$, $c \ge d$, $a \ge d$. (iii). $b < c$. Prove that for all $n$, $p(n) = q(n)$.