Take b = 2.

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

50123 is prime. b^((n-1)/50123)-1 mod n = 13658778, which is a unit, inverse 20082567.

(50123) divides n-1.

(50123)^2 > n.

n is prime by Pocklington's theorem.