How to calculate the value of below expression where $M$ is 1000000007 (prime) and $N$ can be any large number $\le 1000$?
\[\frac{N!}{(N/2)!(N/2)!} \mathbin{\%} M\]
It is possible to simplify it like \[\frac{(N/2 + 1)(N/2 + 2)\cdots N}{(N/2)!}\] but then $(N/2)!$ is still a huge number to calculate.
Now can also simply it further like (n/2 + 1)*(n/2 + 2)...*(n-1)/3*4...(n/2-1). But this still isn't enough.
Is it possible to break it down further?
factorialfunction. But to attract good responses to your question, you need to explain what you want exactly. – OlayinkaSF Feb 6 at 20:44