Primality proof for n = 297191:
Take b = 2.
b^(n-1) mod n = 1.
263 is prime.
b^((n-1)/263)-1 mod n = 209813, which is a unit, inverse 255618.
113 is prime.
b^((n-1)/113)-1 mod n = 141423, which is a unit, inverse 1906.
(113 * 263) divides n-1.
(113 * 263)^2 > n.
n is prime by Pocklington's theorem.