Primality proof for n = 7901:
Take b = 2.
b^(n-1) mod n = 1.
79 is prime.
b^((n-1)/79)-1 mod n = 5754, which is a unit, inverse 92.
5 is prime.
b^((n-1)/5)-1 mod n = 4052, which is a unit, inverse 4943.
(5^2 * 79) divides n-1.
(5^2 * 79)^2 > n.
n is prime by Pocklington's theorem.