Problem

Source: St Petersburg Olympiad 2010, Grade 10, P6

Tags: number theory



Natural number $N$ is given. Let $p_N$ - biggest prime, that $ \leq N$. On every move we replace $N$ by $N-p_N$. We repeat this until we get $0$ or $1$. Prove that exists such number $N$, that we need exactly $1000$ turns to make $0$