Primality proof for n = 47497:
Take b = 2.
b^(n-1) mod n = 1.
1979 is prime. b^((n-1)/1979)-1 mod n = 10774, which is a unit, inverse 7587.
(1979) divides n-1.
(1979)^2 > n.
n is prime by Pocklington's theorem.