Primality proof for n = 17389:
Take b = 2.
b^(n-1) mod n = 1.
23 is prime.
b^((n-1)/23)-1 mod n = 4347, which is a unit, inverse 17385.
7 is prime.
b^((n-1)/7)-1 mod n = 16990, which is a unit, inverse 1874.
(7 * 23) divides n-1.
(7 * 23)^2 > n.
n is prime by Pocklington's theorem.