Primality proof for n = 1389386771:
Take b = 2.
b^(n-1) mod n = 1.
767617 is prime. b^((n-1)/767617)-1 mod n = 494935008, which is a unit, inverse 1058683819.
(767617) divides n-1.
(767617)^2 > n.
n is prime by Pocklington's theorem.