Primality proof for n = 56783:
Take b = 2.
b^(n-1) mod n = 1.
89 is prime.
b^((n-1)/89)-1 mod n = 35225, which is a unit, inverse 31036.
29 is prime.
b^((n-1)/29)-1 mod n = 20233, which is a unit, inverse 28348.
(29 * 89) divides n-1.
(29 * 89)^2 > n.
n is prime by Pocklington's theorem.