2023 WSMO Accuracy Round Problems/Problem 7

Problem

How many ordered triplets of integers $(a, b, c)$ satisfy $a^2 + 2ab + b^2 = c^2 - 6c + 9$ and $-2 \le a, b, c \le 7$?

Solution