Here is a function that returns a list of all primes up to a given number:

Scroll to Top