I have the function written above. It was calculated by WolframAlpha and the result is 0.
I've tried to implement the formula in Matlab with the code below:
if (48-s >= 24)
bin1 = nchoosek(48-s,24);
bin1 = 0;
if (47-s >= 24)
bin2 = nchoosek(47-s,24);
bin2 = 0;
tmp = tmp + (-1)^s * nchoosek(24,s) * (bin1-bin2);
But my code outputs (variable tmp) the result -2 instead of 0. I am not seeing, where the mistake is.
I would appreciate, if someone could help me.