I didn't use divisions or remainders, only multiplications. I've changed it so it only uses addition and now it still doesn't outperform a version that only checks odd's. it's not as fast as your version where every index corresponds to i*2+1 because I fill every even number with false...