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 !

Suggested Topics

Topic Category Replies Views Activity
Off-topic 1 81 Apr 9

Want to read more? Browse other topics in Off-topic or view latest topics.