Problem

Source: JBMO Shortlist 2022

Tags: number theory, Sum of Squares, Digits, Junior, Balkan, shortlist



Find all positive integers $n$ for which there exists an integer multiple of $2022$ such that the sum of the squares of its digits is equal to $n$.