Primality proof for n = 991057:
Take b = 2.
b^(n-1) mod n = 1.
1877 is prime. b^((n-1)/1877)-1 mod n = 89255, which is a unit, inverse 708158.
(1877) divides n-1.
(1877)^2 > n.
n is prime by Pocklington's theorem.