Tests whether an integer is prime by trial division. When the smallest prime factor equals n itself, n is prime; any smaller factor is proof that it is not. The nearest primes below and above are shown as well.