Check primality, build factor trees and generate primes. Learn the sieve of Eratosthenes with examples.