Primality proof for n = 163027:
Take b = 2.
b^(n-1) mod n = 1.
3019 is prime. b^((n-1)/3019)-1 mod n = 21839, which is a unit, inverse 73261.
(3019) divides n-1.
(3019)^2 > n.
n is prime by Pocklington's theorem.