Problem

Source: Iran MO 3rd round 2023 ,Day 2 P1

Tags: algebra



For any function $f:\mathbb{N}\to\mathbb{N}$ we define $P(n)=f(1)f(2)...f(n)$ . Find all functions $f:\mathbb{N}\to\mathbb{N}$ st for each $a,b$ : $$P(a)+P(b) | a! + b!$$