Primality proof for n = 324689:
Take b = 2.
b^(n-1) mod n = 1.
223 is prime.
b^((n-1)/223)-1 mod n = 174687, which is a unit, inverse 211597.
13 is prime.
b^((n-1)/13)-1 mod n = 26003, which is a unit, inverse 218478.
(13 * 223) divides n-1.
(13 * 223)^2 > n.
n is prime by Pocklington's theorem.