Questions tagged [summation]

Questions using the Sum command, especially for series and other algebraic objects, and related functions such as SumConvergence

Relevant documentation pages:

983 questions
28
votes
2 answers

How do you put conditions on indices in a sum?

I'm relatively inexperienced with mathematica, so I apologize if this is a trivial question. I want to take a double sum over a function $f(i,j)$ of two indices, of the form $$ \sum_{i = -\infty}^\infty \sum_{j = 0\atop j\not = i}^m f(i,j). $$ That…
Nick Strehlke
  • 413
  • 1
  • 4
  • 6
12
votes
4 answers

Finite sum not evaluating

Mathematica refuses to evaluate this summation. Sum[2^(k + 1)^3 - 2^(k - 1)^3, {k, 0, n}] It just returns the form unevaluated. $\sum _{k=0}^n \left(2^{(k+1)^3}-\ 2^{(k-1)^3}\right)$ Is there some special command for this case? I think it should…
zeros
  • 2,263
  • 1
  • 14
  • 18
12
votes
2 answers

Summation bug in 11.2

If I sum all the positive-numbered Fourier coefficients of $\cos(x)$, I get the correct answer. If I sum the negative-numbered ones, I get a wrong answer. Splitting the sum into two parts somehow fixes the issue. Sum[FourierCoefficient[Cos[x], x,…
Alex Bogatskiy
  • 1,680
  • 12
  • 19
11
votes
1 answer

2016 Putnam B6 difficult summation problem

Problem B6 on the 2016 Putnam exam is to calculate: $$\sum\limits_{k=1}^\infty \left( \frac{(-1)^{k-1}}{k} \sum\limits_{n=0}^\infty \frac{1}{k 2^n + 1} \right)$$ The direct approach Sum[(-1)^{k-1}/k Sum[1/(k 2^n + 1),{n,0,\[Infinity]}], {k,1,…
David G. Stork
  • 41,180
  • 3
  • 34
  • 96
11
votes
0 answers

What does that output of Sum mean?

I made the computation ClearAll["Global`*"]; r = Sum[1/2^(k*n/(k + n)), {k, 1, 2*n}, Assumptions -> n ∈ Integers && n > 0] and got (1-4^(-(n^2/(n+Sum`SumqBaseDump`u$274844))))/(-1+2^(n/(n+Sum`SumqBaseDump`u$274844))) I can find nothing about…
user64494
  • 26,149
  • 4
  • 27
  • 56
9
votes
4 answers

Skip certain values in a sum

How can I evaluate such a sum: $$ \sum_{j=0, j\neq10}^{J} f(j) $$ Since I am trying to do some symbolic calculations, solutions such as the one below are undesirable: $$ -f(10) + \sum_{j=0}^{J} f(j) $$ Thanks.
user191919
  • 587
  • 4
  • 9
9
votes
1 answer

Understanding Dirichlet regularization in Sum

I've tried to calculate few classic sums using Dirichlet regularization: Sum[n, {n, 1, ∞}, Regularization -> "Dirichlet"] Sum[n^2, {n, 1, ∞}, Regularization -> "Dirichlet"] I get expected results: -1/12 and 0. But when I start sum from the 0, I…
m0nhawk
  • 3,867
  • 1
  • 20
  • 35
8
votes
6 answers

Alternating sum

A frog is at the bottom of a 30 metre well. Each day it climbs 5 metres up the side, but it then slips back 3 metres each night. How long does it take to reach the top of the well? Is there an easier /more direct way to make an alternating sum than…
martin
  • 8,678
  • 4
  • 23
  • 70
8
votes
5 answers

Sum all numbers from 1 to 1000 divided by either 2,3,5 or 7

How do I find the sum all numbers from 1 to 1000 divided by atleast one of 2,3,5 or 7? EDIT: I am sorry for complicating this, but I need it to work for 10^11. So anything that requires too much heap space or too long loops will fail.
Roi
  • 99
  • 1
  • 4
8
votes
2 answers

Incorrect answer given by Sum

Is this a bug? Sum[Binomial[2 n - 1, 2 m - 1]*(L - 2 - 2*(2 m - 1)), {m, 1, n}] gives -4^(-1 + n) (1 - L + 2 n) However, clearly, if n=1, the series is L-4 where m can take the only value of 1. But the answer computed by Mathematica -4^(-1 + n) (1…
Jake Pan
  • 526
  • 3
  • 10
7
votes
0 answers

Converting a sum into Σ notation in output

How can I convert the sum into Σ notation in output? For example, I have an array of Array[k,4]. My input is Array[k,4] Sum[K[i], {i, 1, 4}]-K[4] Then the output will be K[1] + K[2] + K[3]. If I use Holdform in the input HoldForm[Sum[K[i], {i,…
user2230101
  • 195
  • 4
6
votes
2 answers

Wrong output from Mathematica when evaluating a summation

Consider the sum $$\sum_{r=0}^n \binom{n-r-1}{n-r}$$ This sum is not zero because when $r=n$, the result is $\binom{-1}{0} = 1$. However, plugging this formula into Wolfram Alpha does return zero. Why is this?
user2820579
  • 161
  • 2
6
votes
1 answer

Is there an easy way to speed up this double summation in Mathematica

I would like to make an intensity plot of Bosons in a harmonic trapping potential. Hence, I would like to execute the following double summation (everything made dimensionless) for as many terms as possible wavefunc[x_, n_] := 1/(Sqrt[2^n…
Funzies
  • 391
  • 1
  • 13
6
votes
3 answers

Can I regroup terms into a sum?

Is there a way to regroup terms into a sum? I mean, for example, if I have the sequence $\quad \quad S_1 S_2 + S_2 S_3 + S_3 S_4 + S_4 S_5$ I would like to get the form $\quad \quad {\rm Sum}[S_i\,S_{i+1},\ \{i,\,4\}]$. I actually need this for a…
user50473
  • 579
  • 2
  • 12
6
votes
4 answers

Discrepancy Between Mathematica Result and True Result in Special Cases

Let's define sum1N[m_] := Sum[Cos[x - 2 n Pi/NN]^m, {n, 1, NN}] // Simplify When m=4, we get (3 NN)/8 However, if we compute directly with x=1, NN=4, Cos[1.0 - 2 Pi/4]^4 + Cos[1.0 - 2*2 Pi/4]^4 + Cos[1.0 - 2*3 Pi/4]^4 + Cos[1.0 - 2*4 Pi/4]^4 we…
Ping Chia
  • 63
  • 4
1
2 3
9 10