Skip to main content

For challenges about identifying and manipulating prime numbers

Prime numbers are generally defined as those natural numbers with exactly two distinct factors: 1 and the number itself.

This tag should be used for challenges about finding, testing for, or in any way related to prime numbers. Note that code golf challenges involving prime numbers are discouraged, since the part of prime checking or prime generating can be seen as an irreducible boilerplate.

The first few prime numbers are 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, ...

It is a fairly easy to show that there is no largest prime number, so the set of primes must be countable infinite, but there are no really efficient ways to find large prime numbers with certainty.

Prime numbers can be related to , so consider using that tag as well as checking that tag for duplicates.