Primality proof for n = 343559:
Take b = 2.
b^(n-1) mod n = 1.
9041 is prime. b^((n-1)/9041)-1 mod n = 130192, which is a unit, inverse 91814.
(9041) divides n-1.
(9041)^2 > n.
n is prime by Pocklington's theorem.