Primality proof for n = 289249:
Take b = 2.
b^(n-1) mod n = 1.
131 is prime.
b^((n-1)/131)-1 mod n = 230861, which is a unit, inverse 30204.
23 is prime.
b^((n-1)/23)-1 mod n = 200722, which is a unit, inverse 243261.
(23 * 131) divides n-1.
(23 * 131)^2 > n.
n is prime by Pocklington's theorem.