Problem

Source: 2007 Bulgarian Autumn Math Competition, Problem 10.3

Tags: number theory, coprime, sum function



For a natural number $m>1$ we'll denote with $f(m)$ the sum of all natural numbers less than $m$, which are also coprime to $m$. Find all natural numbers $n$, such that there exist natural numbers $k$ and $\ell$ which satisfy $f(n^{k})=n^{\ell}$.