Find all functions $f:\mathbb{N} \rightarrow \mathbb{N}$, such that $af(a)^3+2abf(a)+bf(b)$ is a perfect square for all positive integers $a,b$.
Source: IMOC 2023 N4
Tags: number theory
Find all functions $f:\mathbb{N} \rightarrow \mathbb{N}$, such that $af(a)^3+2abf(a)+bf(b)$ is a perfect square for all positive integers $a,b$.