Primality proof for n = 18141104598658771:
Take b = 2.
b^(n-1) mod n = 1.
604703486621959 is prime.
b^((n-1)/604703486621959)-1 mod n = 1073741823, which is a unit, inverse 236122631116049.
(604703486621959) divides n-1.
(604703486621959)^2 > n.
n is prime by Pocklington's theorem.