TITLE: contest problem related to divisor function
QUESTION [5 upvotes]: Prove or disprove that there is only a finite set  of numbers which cannot be written as n + $\sigma(n)$, where sigma(n) - number of divisors of n.
I know that $\sigma (p_1^{\alpha_1}\cdot...\cdot p_n^{\alpha_n}) = \prod(1+\alpha_i)$ 
i've tried to construct an infinite sequence and thought about numbers like $((2^2)^2)...^2$ but it all didn't worked out. 
i will appreciate any kind of hints.

REPLY [3 votes]: There exists infinitely many positive integers which cannot be expressed as $n + d(n)$, where $d(n)$ is the number of divisors of $n$.
Let $C$ be a large constant. By the Chinese remainder theorem one can construct a positive integer $K$ such that $d(K+1), d(K+2), \ldots , d(K+C)$ are all larger than $C$. Consider now the number of integers $m \in [1, K+C]$ which can be expressed as $m = n + d(n)$. Clearly for any such $m$ we must have $n \le K+C$. By construction, any such $n$ must in fact satisfy $n \le K$. Thus, there is at most $K$ such $m$ in $[1, K+C]$ with the desired representation.