Solution:
For x to be such a number is equivalent to x being a kth root of unity for some k up to 2012. For each k, there are φ(k) primitive kth roots of unity, so the total number of roots is ∑k=12012φ(k).
We will give a good approximation of this number using well known facts about the Möbius function, defined by μ(n)={0(−1)r if n is not squarefree if n has r distinct prime factors . It turns out that if f(n)=∑d∣ng(d), then g(n)=∑d∣nμ(d)f(dn). Using this fact, since n=∑d∣nφ(d), we have that φ(n)=∑d∣nμ(d)dn. Now we have reduced the problem to estimating ∑k=12012∑d∣kμ(d)dk. Let a=dk, so we obtain ∑k=12012∑d∣kaμ(d).
We can interchange the order of summation by writing
d=1∑2012a=1∑⌊d2012⌋aμ(d)≈d=1∑2012μ(d)21(⌊d2012⌋)2≈d=1∑2012μ(d)2d220122=220122d=1∑2012d2μ(d)≈220122d=1∑∞d2μ(d)
The Möbius function also satisfies the property that ∑d∣nμ(d)={10 if n=1 otherwise , which can be seen as a special case of the theorem above (letting f(n)=1,g(n)={10 if n=1 otherwise ). We can then see that (∑d=1∞d2μ(d))(∑c=1∞c21)=121=1, so ∑d=1∞d2μ(d)=π26. Therefore, we have ∑k=12012φ(k)≈π23⋅20122= 1230488.266... 2012 is large enough that all of our approximations are pretty accurate and we should be comfortable perturbing this estimate by a small factor to give bounding values.