Primality proof for n = 46271:
Take b = 2.
b^(n-1) mod n = 1.
661 is prime. b^((n-1)/661)-1 mod n = 19209, which is a unit, inverse 20923.
(661) divides n-1.
(661)^2 > n.
n is prime by Pocklington's theorem.