Implementations of some primality tests