Primality proof for n = 252949:
Take b = 2.
b^(n-1) mod n = 1.
197 is prime.
b^((n-1)/197)-1 mod n = 2526, which is a unit, inverse 118864.
107 is prime.
b^((n-1)/107)-1 mod n = 98857, which is a unit, inverse 108777.
(107 * 197) divides n-1.
(107 * 197)^2 > n.
n is prime by Pocklington's theorem.