I don't quite understand the reason to use Xn+2X, don't we just need a Sieve of Erastothenes (sp?): change the color of all multiples leaving all primes in the base colour?
That's what it does, but the counting starts from zero. So if we select 7 as a prime we get 7n. For n=0,1,2 we get 0,7,14, of which only 14 is the one we want to remove.