Primality proof for n = 878766598991:
Take b = 2.
b^(n-1) mod n = 1.
1814921 is prime. b^((n-1)/1814921)-1 mod n = 300206661287, which is a unit, inverse 158983999210.
(1814921) divides n-1.
(1814921)^2 > n.
n is prime by Pocklington's theorem.