Primality proof for n = 2857:
Take b = 5.
b^(n-1) mod n = 1.
17 is prime.
b^((n-1)/17)-1 mod n = 1740, which is a unit, inverse 1949.
3 is prime.
b^((n-1)/3)-1 mod n = 2505, which is a unit, inverse 2021.
2 is prime.
b^((n-1)/2)-1 mod n = 2855, which is a unit, inverse 1428.
(2^3 * 3 * 17) divides n-1.
(2^3 * 3 * 17)^2 > n.
n is prime by Pocklington's theorem.