# Nice Integer

Author: mathforces
Problem has been solved: 5 times

Русский язык | English Language

A positive integer $X \in \{1,2,\dots,2019\}$ is called nice if there is a polynomial $P(x)$ with integer coefficients such that for any positive integer $n$, $2020$ divides $P^n(0)$ if and only if $X$ divides $n$. What is the greatest possible nice number? $P^n(0) = P(P(...P(0)...))$ ($n$ times).