Primality proof for n = 37591:
Take b = 2.
b^(n-1) mod n = 1.
179 is prime.
b^((n-1)/179)-1 mod n = 4893, which is a unit, inverse 1767.
7 is prime.
b^((n-1)/7)-1 mod n = 5159, which is a unit, inverse 12081.
(7 * 179) divides n-1.
(7 * 179)^2 > n.
n is prime by Pocklington's theorem.