Problem

Source: Iran MO Third Round 2021 N2

Tags: function, number theory



Find all functions $f:\mathbb{N} \to \mathbb{N}$ such that for any two positive integers $a$ and $b$ we have $$ f^a(b) + f^b(a) \mid 2(f(ab) +b^2 -1)$$Where $f^n(m)$ is defined in the standard iterative manner.