Primality proof for n = 858001:
Take b = 3.
b^(n-1) mod n = 1.
13 is prime.
b^((n-1)/13)-1 mod n = 475196, which is a unit, inverse 814521.
11 is prime.
b^((n-1)/11)-1 mod n = 157914, which is a unit, inverse 339622.
5 is prime.
b^((n-1)/5)-1 mod n = 421969, which is a unit, inverse 847141.
(5^3 * 11 * 13) divides n-1.
(5^3 * 11 * 13)^2 > n.
n is prime by Pocklington's theorem.