Primality proof for n = 41597:
Take b = 2.
b^(n-1) mod n = 1.
10399 is prime. b^((n-1)/10399)-1 mod n = 15, which is a unit, inverse 19412.
(10399) divides n-1.
(10399)^2 > n.
n is prime by Pocklington's theorem.