Prime number utility functions, highly tested and providing unit tests