MathLabs

Problem 2

For a polynomial PP and a positive integer nn, define PnP_n as the number of positive integer pairs (a,b)(a,b) such that a<b≤na<b\le n and ∣P(a)∣−∣P(b)∣|P(a)|-|P(b)| is divisible by nn. Determine all polynomials PP with integer coefficients such that Pn≤2021P_n\le2021 for all positive integers nn.
Step 1 of 6: Answer
P(x)=x+d (d≥−2022)orP(x)=−x+d (d≤2022)P(x)=x+d\ (d\ge-2022)\quad\text{or}\quad P(x)=-x+d\ (d\le2022)
Detailed analysis

The answer consists of the two families P(x)=x+dP(x)=x+d with d≥−2022d\ge-2022 and P(x)=−x+dP(x)=-x+d with d≤2022d\le2022. The later steps prove necessity from a residue-distinctness lemma and then verify these bounds by counting the pairs with equal absolute values.