Primality proof for n = 173497:
Take b = 2.
b^(n-1) mod n = 1.
7229 is prime. b^((n-1)/7229)-1 mod n = 121503, which is a unit, inverse 45972.
(7229) divides n-1.
(7229)^2 > n.
n is prime by Pocklington's theorem.