Problem

Source: Malaysian IMO TST 2022 P5

Tags: number theory



Find all functions $f : \mathbb{Z}\rightarrow \mathbb{Z}$ such that for all prime $p$ the following condition holds: $$p \mid ab + bc + ca \iff p \mid f(a)f(b) + f(b)f(c) + f(c)f(a)$$ Proposed by Anzo Teh Zhao Yang