# PrimeQ

For very large numbers, PrimeQ uses probabilistic prime testing, so it might be wrong sometimes (a number might be composite even though PrimeQ says it is prime). The algorithm might be changed in the future.

• PrimeQ[2]

• PrimeQ[-3]

• PrimeQ[137]

• PrimeQ[2 ^ 127 - 1]

All prime numbers between 1 and 100:

• Select[Range[100], PrimeQ]

PrimeQ has attribute Listable:

• PrimeQ[Range[20]]