Reduce the sequenceor how to calculate it efficiently

  • Context: Graduate 
  • Thread starter Thread starter kuldeepfouzda
  • Start date Start date
Click For Summary
SUMMARY

The discussion focuses on efficiently calculating the sequence defined by the summation notation SUMMATION[from k=0 to k=floor(n/2)] (n-k)C(k) * 2(n-k-1) for large values of n, specifically up to 10^10. The solution involves using the Binomial coefficient and powers of 2, with the final result required modulo a prime number, such as 10^9 + 7. Participants suggest using Mathematica with the code Sum[Binomial[n - k, k]*2^(n - k - 1), {k, 0, Floor[n/2]}] or Wolfram Alpha for evaluation.

PREREQUISITES
  • Understanding of summation notation and series
  • Familiarity with Binomial coefficients
  • Knowledge of modular arithmetic
  • Experience with Mathematica or Wolfram Alpha
NEXT STEPS
  • Explore advanced techniques in combinatorial mathematics
  • Learn about efficient algorithms for calculating Binomial coefficients
  • Research modular exponentiation methods for large integers
  • Investigate optimization strategies for Mathematica code execution
USEFUL FOR

Mathematicians, computer scientists, and software developers working on combinatorial problems, particularly those requiring efficient calculations for large values of n.

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: 479

Similar threads

  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 55 ·
2
Replies
55
Views
7K
Replies
7
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
13K
  • · Replies 14 ·
Replies
14
Views
2K