Problem

Source: IMOC 2018 N5

Tags: number theory



Find all positive integers $k$ such that for every $n\in\mathbb N$, if there are $k$ factors (not necessarily distinct) of $n$ so that the sum of their squares is $n$, then there are $k$ factors (not necessarily distinct) of $n$ so that their sum is exactly $n$.