prime number utilities for python