Primality proof for n = 196687:
Take b = 3.
b^(n-1) mod n = 1.
223 is prime.
b^((n-1)/223)-1 mod n = 28615, which is a unit, inverse 598.
7 is prime.
b^((n-1)/7)-1 mod n = 178871, which is a unit, inverse 14385.
(7^2 * 223) divides n-1.
(7^2 * 223)^2 > n.
n is prime by Pocklington's theorem.