Take b = 3.

b^(n-1) mod n = 1.

317 is prime.

b^((n-1)/317)-1 mod n = 4204850, which is a unit, inverse 5260915.

37 is prime.

b^((n-1)/37)-1 mod n = 1648238, which is a unit, inverse 1820223.

(37 * 317) divides n-1.

(37 * 317)^2 > n.

n is prime by Pocklington's theorem.