Click the green flag. Challenge: Remix to make this more exciting!
Prime numbers can be derived from multiples of 6. First my code looks for numbers that have remainders of either 1 or 5 when divided by 6. Then it checks those by dividing by both 5 and 7 to eliminate composite numbers. This means that I have to start the list with the first prime numbers {2, 3, 5, 7} before I begin the mod code. Also, I need to begin the testing loop with n = 2.