Create common Java primality testing library