Problem

Source: Chinese TST 2009 4th P2

Tags: algebra, polynomial, modular arithmetic, number theory, prime numbers, number theory proposed



Find all integers $ n\ge 2$ having the following property: for any $ k$ integers $ a_{1},a_{2},\cdots,a_{k}$ which aren't congruent to each other (modulo $ n$), there exists an integer polynomial $ f(x)$ such that congruence equation $ f(x)\equiv 0 (mod n)$ exactly has $ k$ roots $ x\equiv a_{1},a_{2},\cdots,a_{k} (mod n).$