Finding prime numbers is a very popular programming problem in every programming language.
How to find out if your program is correct?
If you are working with very few results you can verify them by hand. But when you work with larger lists, it’s better to check results with others.
There are two main ways to do this.
First one is to download and use a very fast prime generator program. You can find them with Google.
If your anti-virus software pops lots of alerts against them (mine does very often), you can download and use lists.
There are a few available:
In this site you’ll find some slightly larger lists, greater than 2 billion, and growing.
Good luck.