Reduce the sequenceor how to calculate it efficiently

  • Context: Graduate 
  • Thread starter Thread starter kuldeepfouzda
  • Start date Start date
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 2K views
kuldeepfouzda
Messages
1
Reaction score
0
Sequence is
(in Summation notation)
SUMMATION[from k=0 to k=floor(n/2)] (n-k)C(k) * 2(n-k-1)
refer to this image
http://i.snag.gy/tFI7e.jpg
after expanding it becomes
(n)C(0)*2(n-1) + (n-1)C(1)*2(n-2) + (n-2)C(2) * 2(n-3) +...
I want to calculate the value of function for a large value of n(up to
1010, and ans is to be found MODULUS to some prime number..like
1010+7).

Please simplify the series if possible or let me know the way how to
solve it efficiently.
 
Mathematics news on Phys.org
Mathematica code

Code:
Sum[Binomial[n - k, k]*2^(n - k - 1), {k, 0, Floor[n/2]}]

you can use wolfram alpha to evaluate the exact form, if you don't have mathematica installed.

answer is attached
 

Attachments

  • answer.jpg
    answer.jpg
    27.2 KB · Views: 486