Problem

Source: IMSC 2023 Mock IMO P1

Tags: number theory



Find all functions $f:\mathbb{Z} \rightarrow \mathbb{Z}$ such that $f(1) \neq f(-1)$ and $$f(m+n)^2 \mid f(m)-f(n)$$for all integers $m, n$. Proposed by Liam Baker, South Africa