Primality proof for n = 165437:
Take b = 2.
b^(n-1) mod n = 1.
701 is prime. b^((n-1)/701)-1 mod n = 11880, which is a unit, inverse 124593.
(701) divides n-1.
(701)^2 > n.
n is prime by Pocklington's theorem.