Primality proof for n = 19851313:
Take b = 2.
b^(n-1) mod n = 1.
1097 is prime.
b^((n-1)/1097)-1 mod n = 3689605, which is a unit, inverse 3614956.
13 is prime.
b^((n-1)/13)-1 mod n = 4216008, which is a unit, inverse 8865831.
(13 * 1097) divides n-1.
(13 * 1097)^2 > n.
n is prime by Pocklington's theorem.