Primality proof for n = 124769:
Take b = 2.
b^(n-1) mod n = 1.
557 is prime. b^((n-1)/557)-1 mod n = 91926, which is a unit, inverse 68913.
(557) divides n-1.
(557)^2 > n.
n is prime by Pocklington's theorem.