Primality proof for n = 29822497:
Take b = 2.
b^(n-1) mod n = 1.
911 is prime.
b^((n-1)/911)-1 mod n = 5342602, which is a unit, inverse 24573073.
31 is prime.
b^((n-1)/31)-1 mod n = 19185763, which is a unit, inverse 14921555.
(31 * 911) divides n-1.
(31 * 911)^2 > n.
n is prime by Pocklington's theorem.