python

2019 Putnam Problem A1 Exploration in Python

Problem A1 of the 2019 Putnam Competition states: Determine all possible values of the expression \(A^3 + B^3 + C^3 − 3ABC\) where \(A\), \(B\), and \(C\) are nonnegative integers. In the real test, you can’t use a computer. Nevertheless, let’s generate some examples in Python. We’ll generate all \(A\), \(B\), \(C\) with \(10 \geq A \geq B \geq C \geq 0\) and look at all unique values of the expression less than 30.