IMO 2007 Shortlist N5

Find all surjective functions f : N → N such that for every m,n ∈ N and every prime p, the number f(m + n) is divisible ...

IMO 2007 Shortlist N5

Category: Number Theory

Problem

Find all surjective functions f : N → N such that for every m,n ∈ N and every prime p, the number f(m + n) is divisible by p if and only if f(m) + f(n) is divisible by p. (N is the set of all positive integers.) (Iran)