Problem

Source: Belarusian National Olympiad 2024

Tags: number theory



For each number $x$ we denote by $S(x)$ the sum of digits from its decimal representation. Find all positive integers $m$ for each of which there exists a positive integer $n$, such that $$S(n^2-2n+10)=m$$Chernov S.