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