Hello, I am trying to compute C(n, k) = n! / ( (n - k)! * k! ) mod m without using the recurrence relation C(n, k) = C(n - 1, k) + C(n-1, k-1).
m might be a composite number and we might have n >= m. I know how to do it mod p where p is prime and we have n < p, but in my case the modulus is composite and n can also be larger than the modulus... I have found some information on the web, but nothing explained clearly.
Can someone help me ?
Thanks in advance !
Computing n choose k modulo composite m
Moderator: Board moderators
-
- New poster
- Posts: 3
- Joined: Thu Aug 07, 2014 12:47 pm
Re: Computing n choose k modulo composite m
GREAT POST