positive Integer value of $n$ for which $2005$ divides $n^2+n+1$ 
How Can I calculate positive Integer value of $n$ for which $2005$
  divides $n^2+n+1$

My try:: $2005 = 5 \times 401$
means $n^2+n+1$ must be a multiple of $5$ or multiple of $401$
because $2005 = 5 \times 401$
now $n^2+n+1 = n(n+1)+1$
now $n(n+1)+1$ contain last digit $1$ or $3$ or $7$
$\bullet $ if last digit of $n(n+1)+1$ not contain $5$. So it is not divisible by $5$
Now how can I calculate it? please explain it to me.

A number of the form $n^2+n+1$ has divisors of the form 3, or any number of $6n+1$, and has a three-place period in base n.
On the other hand, there are values where 2005 divides some $n^2+n-1$, for which the divisors are of the form n, 10n+1, 10n+9. This happens when n is 512 or 1492 mod 2005.
