Problem

Source: Macedonian TST for IMO 2013 - P3 day 1

Tags: algebra, functional equation, function, number theory



Denote by $\mathbb{Z}^{*}$ the set of all nonzero integers and denote by $\mathbb{N}_{0}$ the set of all nonnegative integers. Find all functions $f:\mathbb{Z}^{*} \rightarrow \mathbb{N}_{0}$ such that: $(1)$ For all $a,b \in \mathbb{Z}^{*}$ such that $a+b \in \mathbb{Z}^{*}$ we have $f(a+b) \geq $ min $\left \{ f(a),f(b) \right \}$. $(2)$ For all $a, b \in \mathbb{Z}^{*}$ we have $f(ab) = f(a)+f(b)$.