← RoseCode

ROSECODE 550

A specific sum over all subsets of a set

C_K_Yang · Math ·

Given two positive integers N and M with 0<NM, let I(N,M) be the set which contains all natural numbers between N and M(inclusive). For example, I(3,6)={3,4,5,6}

We define the product of a set as the product of all elements in that set, written as P({...}) where {...} is a specific set. For example, P(I(3,6))=3×4×5×6=360

Finally, We define a function C(N,M,K) as the sum of product of sets over all I(N,M)'s subsets which contain exactly K elements.

In other words, C(N,M,K)=SI(N,M), len(S)=KP(S)

You are given C(10,20,3)=549450 and C(100,200,10)mod(1018+3)=491824643147614094

Find i=1500C(1020,1120,i)

Give your answer modulo (1018+3)


[My timing: 4 s(Python)]