Using 2*listOfPrimes[i] instead of adding listOfPrimes[i] twice