Solution:
Since p−1 is a divisor of p! the greatest common divisor of p−1 and p!+2n is a power of two. We shall show that both numbers p−1 and p!+2n have at least one odd divisor.
Suppose that p−1=2k, i.e. p=2k+1. If s≥3 is an odd divisor of k then
p=2st+1=(2t+1)A, i.e. p is not a prime number. Therefore k=2t giving
2p−1−1=22k−1=(22k−1−1)(22k−1+1)=⋯=(22t−1)(22t+1)(22t+1+1)…(22k−1+1)
It is clear that p2 does not divide the above product since (22t+1,22l+1)=1 when l>t, and 22t−1<p=22t+1. Therefore p−1 is not a power of 2.
Suppose that p!+2n=2k, giving k>n and p!=2n(2k−n−1). Then p is a divisor of 2m−1, where m=k−n. Let t be the least positive integer such that p divides 2t−1. Then t is a divisor of m and t is a divisor of p−1. If p−1=lt then
2p−1−1=(2t−1)(2t(l−1)+2t(l−2)+⋯+2t+1)
Since 2t≡1(modp) we have 2t(l−1)+2t(l−2)+⋯+2t+1≡l≡0(modp). Therefore p2 is a divisor of 2t−1 which implies that p2 is a divisor of 2m−1, i.e. p2 is a divisor of p!, a contradiction.
Thus, both p−1 and p!+2n have at least one odd divisor and these divisors are distinct. Therefore the product (p−1)(p!+2n) has at least three distinct prime divisors.