Let a=\pi / 2008. Find the smallest positive integer n such that

2\left[\cos (a) \sin (a)+\cos (4 a) \sin (2 a)+\cos (9 a) \sin (3 a)+\cdots+\cos \left(n^{2} a\right) \sin (n a)\right]

is an integer.

2\left[\cos (a) \sin (a)+\cos (4 a) \sin (2 a)+\cos (9 a) \sin (3 a)+\cdots+\cos \left(n^{2} a\right) \sin (n a)\right]

is an integer.