3There are a number of Mathematica functions similar to PrimeQ which test to see if the argument belongs in a certain set (even numbers, odd numbers, prime numbers, and the like). These functions all end in Q. Try entering ?*Q to find out what they all are.

Get Mathematica DeMYSTiFied now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.