Primality proof for n = 18127:
Take b = 2.
b^(n-1) mod n = 1.
53 is prime.
b^((n-1)/53)-1 mod n = 7150, which is a unit, inverse 2122.
19 is prime.
b^((n-1)/19)-1 mod n = 15757, which is a unit, inverse 4918.
(19 * 53) divides n-1.
(19 * 53)^2 > n.
n is prime by Pocklington's theorem.