Primality proof for n = 51473:
Take b = 2.
b^(n-1) mod n = 1.
3217 is prime. b^((n-1)/3217)-1 mod n = 14062, which is a unit, inverse 36403.
(3217) divides n-1.
(3217)^2 > n.
n is prime by Pocklington's theorem.