2019 A1

A problem about determining possible values from a given expression.

Last updated 9/21/25

Problem Setup

Determine all possible values of the expression \[\begin{equation*} A^3 + B^3 +C^3 -3ABC \end{equation*}\] where \(A, B,\) and \(C\) are nonnegative integers.

Solution

Without loss of generality, we can assert that \[\begin{equation*} A \ge B \ge C \end{equation*}\] since \(A,B\) and \(C\) are exchangeable in the given expression. For example, if we have \(A=1\), \(B=1\), and \(C=3\), we can just switch the labels of \(A\) and \(C\) without changing the value of the expression. This is true for all \(A,\) \(B,\) and \(C\).

Let \(B=A-b\) and \(C = A-c\), with \(b,c \in \mathbb{N}\) and \(b \ge c \ge 0\) and \(A \ge b\) (otherwise our asserted ordering fails). Then, the original expression becomes \[\begin{align*} A^3 + (A-b)^3 + (A-c)^3 -3A(A-b)(A-c) &= 3Ab^2-3Abc+3Ac^2-b^3-c^3 \\ &= 3A(b^2-bc+c^2) - (b^3-c^3) \end{align*}\] We’ll denote this expression \(E\). For \(b=1\) and \(c=0\) (assuming \(A\ge1\)): \[\begin{equation} E=3A(1)-(1) = 3A-1 \end{equation}\] For \(b=c=1\) (still with \(A\ge1)\): \[\begin{equation} E=3A(1-1+1)-(1+1) = 3A-2 \end{equation}\] For \(b=2\) and \(c=1\), assuming \(A\ge2\): \[\begin{equation} E=3A(4-2+1)-(8+1) = 9(A-1) \end{equation}\] Considering expressions 1, 2, and 3, we can realize a few groups of possible values. Expressions 1 and 2 guarantee all integers that are not a multiple of 3, and expression 3 guarantees all integers that are a multiple of 9. In the next section, we will show that these are the only possible integers for the given expression.

To determine what multiples of 3, if any, are possible, we need to find the \(b\) and \(c\) that causes \(E=3A(b^2-bc+c^2)-(b^3 + c^3)\) to be a multiple of 3. Since the first term is already a multiple of 3, we only really need to determine when \(b^3 +c^3 \equiv0\) (mod 3) is true. If \(b\equiv c \equiv0\) (mod 3), then \[\begin{align*} E = 3A\Bigg( 3^2\Big(\frac{b}{3} \Big)^2 - 3^2 \Big( \frac{bc}{3^2} \Big) +3^2 \Big( \frac{c}{3} \Big)^2 \Bigg) -3^3\Bigg( \Big( \frac{b}{3} \Big)^3 + \Big( \frac{c}{3} \Big)^3 \Bigg) \end{align*}\] and so \(E\) is a multiple of 9. The only other choice of \(b\) and \(c\) is \(b\equiv1\) (mod 3) and \(c\equiv2\) (mod 3), or vice versa, since it is the only remaining combination that still gives \(b^3+c^3 \equiv0\) (mod 3). We then have \[\begin{align*} E &= 3A\Big( (3x+1)^2 -(3x+1)(3y+2) +(3y+2)^2 \Big) - \Big( (3x+1)^3 + (3y+2)^3 \Big) \\ &= 3A\Big( (3x+1)^2 -(3x+1)(3y+2) +(3y+2)^2 \Big) - \Big( 9r+9 \Big) \end{align*}\] In the first term, we can note that \((3x+1)^2 \equiv (3y+2)^2 \equiv 1\) (mod 3) and \((3x+1)(3y+2) \equiv 2\) (mod 3), so the sum \((3x+1)^2 -(3x+1)(3y+2) + (3y+2)^2 \equiv 0\) (mod 3), making the first term also a multiple of 9. Therefore, the only choices of \(b\) and \(c\) that make the expression \(E\) a multiple of 3 also force it to be a multiple of 9.

Finally, we can say that the only possible values of \(A^3+B^3+C^3 -3ABC\) are all nonnegative integers except those that are 3 or 6 (mod 9).