Primality proof for n = 29387:
Take b = 2.
b^(n-1) mod n = 1.
2099 is prime. b^((n-1)/2099)-1 mod n = 16383, which is a unit, inverse 287.
(2099) divides n-1.
(2099)^2 > n.
n is prime by Pocklington's theorem.