Problem

Source: 2024 Taiwan TST Round 2 Mock P3

Tags: functional equation, number theory



Let $\mathbb{N}$ be the set of all positive integers. Find all functions $f\colon \mathbb{N}\to \mathbb{N}$ such that $mf(m)+(f(f(m))+n)^2$ divides $4m^4+n^2f(f(n))^2$ for all positive integers $m$ and $n$.