Primality proof for n = 342682509629:
Take b = 2.
b^(n-1) mod n = 1.
766223 is prime. b^((n-1)/766223)-1 mod n = 199420104102, which is a unit, inverse 155456165842.
(766223) divides n-1.
(766223)^2 > n.
n is prime by Pocklington's theorem.