Loading [MathJax]/extensions/TeX/mathchoice.js

Problem #204

Combination Addition

S(N) = \sum_{n=0,k=0}^{2k \leq n \leq N} {{n-k} \choose k}

Find S(10^{18}) modulo 10^9+7.

n \choose k represents the binomial coefficient.

Contributed by Harshit Singhal

Solved by 32 users

Log in to submit answers.

Is something wrong?

Maintaining a collection of high quality questions is our top priority. If, however, you do find an error, report the problem and we'll make sure it is reviewed soon.