Problem

Source: St Petersburg Olympiad 2011, Grade 10, P2

Tags: number theory



$n$ - some natural. We write on the board all such numbers $d$, that $d\leq 1000$ and $d|n+k$ for some $ 1\leq k \leq 1000$. Let $S(n)$ -sum of all written numbers. Prove , that $S(n)<10^6$ and $S(n)>10^6$ has infinitely many solutions.