Primality proof for n = 16451:
Take b = 2.
b^(n-1) mod n = 1.
47 is prime.
b^((n-1)/47)-1 mod n = 5824, which is a unit, inverse 1144.
7 is prime.
b^((n-1)/7)-1 mod n = 2450, which is a unit, inverse 11744.
(7 * 47) divides n-1.
(7 * 47)^2 > n.
n is prime by Pocklington's theorem.