21. Find the number of positive integers $n$ such that
$$
n+2 n^{2}+3 n^{3}+\cdots+2005 n^{2005}
$$
is divisible by $n-1$.
21. Ans: 16
Let $n+\cdots+2005 n^{2005}=f(n)(n-1)+a$ where $f(n)$ is a polynomial of $n$. If $n=1$, we have $a=1+2+\cdots+2005=2005 \times 1003$. Observe that $n+\cdots+2005 n^{2005}$ is divisible by $n-1$ if and only if $a=2005 \times 1003$ is divisible by $n-1$. The prime factorization of $a$ is $a=5 \times 401 \times 17 \times 59$. So $a$ has only $2^{4}=16$ factors. Thus there are 16 possible positive integers $n$ such that $n+\cdots+2005 n^{2005}$ is divisible by $n-1$.