Ok, very well, than how you check it?
Please make small test:
1
1 100
You could find correct answers on net, but I give you:
List of prime numbers up to 100:
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97,
Please compare that list with answer of your program.
Or plese look for that. It’s show your’s wrong method of prepare prime. Bolded and in [ ] number are of course wrong.
2, 3, 5, [6], 7, 11, [12], 13, 17, [18], 19, 23, [24], 25, 29, [30], 31, 35, [36], 37, 41, [42], 43, 47, [48], 49, 53, [54], 55, 59, [60], 61, 65, [66], 67, 71, [72], 73, 77, [78], 79, 83, [84], 85, 89, [90], 91, 95, [96], 97
…
or in other form:
n*6 your prime - n*6 +\- 1
0 2, 3 <- it's out of rule
6 5, 7
12 11, 13
18 17, 19
24 23, 25 <--- first wrong
.......
72 71, 73
etc