Primality proof for n = 402021673:
Take b = 2.
b^(n-1) mod n = 1.
1288531 is prime. b^((n-1)/1288531)-1 mod n = 297945233, which is a unit, inverse 142086214.
(1288531) divides n-1.
(1288531)^2 > n.
n is prime by Pocklington's theorem.