prime numbers helpers and last lecture