Primality proof for n = 858397:
Take b = 2.
b^(n-1) mod n = 1.
929 is prime. b^((n-1)/929)-1 mod n = 730925, which is a unit, inverse 575387.
(929) divides n-1.
(929)^2 > n.
n is prime by Pocklington's theorem.