Primality proof for n = 868583:
Take b = 2.
b^(n-1) mod n = 1.
3037 is prime. b^((n-1)/3037)-1 mod n = 184495, which is a unit, inverse 405458.
(3037) divides n-1.
(3037)^2 > n.
n is prime by Pocklington's theorem.