//loop starts at 3 (so it can add 2 instead of 1 per step) print("2 "); for(3->A;;A+2->A) { 0->C; sqrtA->D; //prime number check with modulo for(2->B; C==0 && B<=D; B+1->B) { if((A%B)==0) 1->C; } if(C==0) { print(A); print("\t"); } }