Primality proof for n = 597386494759892631967:
Take b = 2.
b^(n-1) mod n = 1.
629314117180951 is prime.
b^((n-1)/629314117180951)-1 mod n = 262677853880977008180, which is a unit, inverse 455153706282616162723.
(629314117180951) divides n-1.
(629314117180951)^2 > n.
n is prime by Pocklington's theorem.