Primality proof for n = 1387801:
Take b = 2.
b^(n-1) mod n = 1.
257 is prime.
b^((n-1)/257)-1 mod n = 527100, which is a unit, inverse 887021.
5 is prime.
b^((n-1)/5)-1 mod n = 431708, which is a unit, inverse 782333.
(5^2 * 257) divides n-1.
(5^2 * 257)^2 > n.
n is prime by Pocklington's theorem.