WLJS LogoWLJS Notebook

Primes

Primes represents the domain of prime numbers, as in x∈Primes.

Examples

Test if a number is prime:

7Primes
(* True *)

Find primes in a range:

Select[Range[20], #Primes &]
(* {2, 3, 5, 7, 11, 13, 17, 19} *)

Please visit the official Wolfram Language Reference for more details.

On this page