Primality proof for n = 5171003929967:
Take b = 2.
b^(n-1) mod n = 1.
28859 is prime.
b^((n-1)/28859)-1 mod n = 4707046327936, which is a unit, inverse 903777470480.
2281 is prime.
b^((n-1)/2281)-1 mod n = 2405770228312, which is a unit, inverse 1408483455690.
(2281 * 28859) divides n-1.
(2281 * 28859)^2 > n.
n is prime by Pocklington's theorem.