1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Reduce the sequenceor how to calculate it efficiently

  1. Jul 5, 2012 #1
    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
    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

    Please simplify the series if possible or let me know the way how to
    solve it efficiently.
  2. jcsd
  3. Jul 5, 2012 #2
    Mathematica code

    Code (Text):
    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

    Attached Files:

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Threads - Reduce sequenceor calculate Date
B Calculate probability of getting 2 red balls Mar 2, 2018
I Can you reduce a vector triple product? i.e. (A x (uB x C)) Jan 19, 2018
B Reducing fractions Mar 20, 2016
Reducing a mathematical expression Dec 4, 2014
Reducing fractions and lower math? May 28, 2013