You are viewing a single comment's thread. Return to all comments →
sir, please tell me how can you reduce Dr^-1 to Dr^(p-2) by using little fermat's theorem..??
sir , thanks for advance .....
If a is not divisible by p
n! will not be a multiple of p if n > p and p is prime.
a^(p-1) % p= 1
Dr^-1 = (Dr^-1) * (1)
Dr^-1 % p = ((Dr^-1) * (Dr^(p-1)) ) % p
Dr^-1 % p = (Dr^(p-2)) % p
Little fermat's theorem applies:
a^p = a (mod p),
where p is prime number, a in Z and is not divided by p.
so you can divide by a.
division by a^2 gives you: a^(p-2) = a^-1 (mod p)