I\'m trying to find a counterexample to the Pólya Conjecture which will be somewhere in the 900 millions. I\'m using a very efficient algorithm that doesn\'t even require an
You can try splitting it up into multiple arrays.
for(int x = 0; x <= 1000000; x++){ myFirstList.add(x); } for(int x = 1000001; x <= 2000000; x++){ mySecondList.add(x); }
then iterate over them.
for(int x: myFirstList){ for(int y: myFirstList){ //Remove multiples } } //repeat for second list