Hello Eswar, As stated by Siddhartha, the actula statement for Wilson's theorem is: (p-1)!+1=0(mod p) Since, divisibility of 23 is asked for, we have to relate (18!+1) to (23-1)!+1. So lets start with (23-1)!+1. let us say a=(23-1)!+1 and b=(18!+1) By Wilson's theorem, a is divisible by 23. So, let us say, a=23c 23c = a = (23-1)!+1 = (18!)*(19*20*21*22)+1 = (18!+1)*(19*20*21*22)-1*(19*20*21*22)+1 = b*(19*20*21*22)-175560+1 = b*(19*20*21*22)-175559 = b*(19*20*21*22)-23*7633 Therefore, b*(19*20*21*22) = 23*(c+7633) ...........................Eqn 1 The RHS of Eqn 1 is divisible by 23, so must be the case with LHS. Therefore, LHS is divisible by 23. But, (19*20*21*22) is not divisible by 23. Hence b must be divisible by 23. Hence, (18!+1)is divisible by 23 Hence proved!!!
Satyaram B V,
General Secretary, Mandakini Hostel,
IIT Madras