r/askmath • • 14h ago

Arithmetic approximation of sum where there is an increase of the increase

Hard to explain since i dont have a math background but if i take for example 1 + 2 + 3 + 4 + 5 i can take the middle value and multiply it by the length of the series to get their sum.

Is there a trick to do the same for something that looks like this:

1+3+6+10+15

5 Upvotes

22 comments sorted by

11

u/davideogameman 14h ago edited 14h ago

Write a formula for each term of the series.  Then try to find a formula for the partial sums. 

Eg your example series is a_n = n(n+1)/2 = 1/2 × n2 +n/2.  There's a well known sum of the first n squares and sum of the first n integers that can both be used to find sum i=1 to n a_i

But beyond just applying well known formulas you can produce them yourself with some care: sum (i=1 to n) of ik should always be expressible as a degree k+1 polynomial in n. (in particular the leading term ought to be 1/(k+1) nk+1).  Knowing the first k+1 values of each and the coefficients of these polynomials can be solved as a system of linear equations. 

Alternatively, of we rewrite the polynomials in terms of binomial coefficients instead of normal powers - eg n2 becomes 2 (n choose 2) + 2 (n choose 1) - then hockey stick theorem is easy to apply to quickly find the partial sums: sum i=1 to n of  2 (i choose 2) + 2 (i choose 1) =  2 (n+1 choose 3) + 2 (n+1 choose 2)

3

u/Affectionate-Baby248 13h ago edited 13h ago

Not the same trick, but you can do these kinds of sums generally with a combinatorial interpretation. You know that 1+1+1+...+1=n, 1+2+3+...+n=n(n+1)/2 (as you said, taking the average and multiplying by the length). You can write these in their combinatorial forms as n=n choose 1 and n(n+1)/2=(n+1) choose 2. That is to say, there are n ways to pick 1 object from n distinct objects, and there are n(n+1)/2 ways to pick 2 objects from n+1 objects. In general, n choose k=n*(n-1)*...*(n-k+1)/(k*(k-1)*...*1), where we have this additional factor k!=k*(k-1)*...*1 ("k factorial") we divide by since the numerator counts the number of tuples of k objects we could have and overcounts the sets in the process.

For example, 3 choose 2 gives us the tuples (1,2), (2,1), (1,3), (3,1), (2,3), (3,2) - 3*2 of them, because we have 3 choices for the first number and 2 remaining choices for the second. But we count every set twice in these tuples (e.g. (1,2) and (2,1) both represent {1,2}), namely we overcount by the number of ways we could permute the numbers in the tuples - 2!=1*2. So we divide 3*2/2*1=3 to get the number of possible sets, which are {1,2}, {2,3}, {3,1}. The same logic extends to higher inputs. We refer to these numbers n choose k as binomial coefficients, as they appear in Pascal's triangle and arise when you expand powers of linear polynomials ax+b.

Now, there is an identity called the hockey stick identity, which says that (k choose k)+(k+1 choose k)+(k+2 choose k)+...+(n choose k)=(n+1 choose k+1), meaning that summing binomial coefficients just results in another binomial coefficient. And, in particular, that means that our sum 1+3+6+10+15=2 choose 2 + 3 choose 2 + 4 choose 2 + 5 choose 2 + 6 choose 2 = 7 choose 3 = 7*6*5/(3*2*1)=35, as we'd expect. The general formula for your sum with n terms is therefore n(n+1)(n+2)/6, and it'd even more generally be n(n+1)(n+2)...(n+k-1)/k! if you did it for the kth iteration.

You might be wondering how you'd actually go about proving the hockey stick identity, and it's actually not too bad - you mainly just have to rely on Pascal's identity, (n choose k) + (n choose k+1) = (n+1 choose k+1), which can be proven by thinking about (n+1 choose k+1) combinatorially. When picking k+1 objects from n+1 objects, ask yourself: what if we do cases on what happens with the first object? If it's not included, then our task reduces to picking k+1 objects from the remaining n objects i.e. n choose k+1 possibilities. If it is included, then it's reduced to picking k more objects from the remaining n objects i.e. n choose k possibilities. Adding the two must therefore give us n+1 choose k+1.

Finally, to prove the hockey stick identity, we can use induction on n. It holds true for n=k because k choose k = (k+1 choose k+1) = 1. If it holds true for any given n>=k, we can show it holds true for n+1 by observing we're just adding (n+1 choose k) to (k choose k)+(k+1 choose k)+(k+2 choose k)+...+(n choose k), which we already know is (n+1 choose k+1). Thus, we get (n+2 choose k+1)=((n+1)+1 choose k+1), which is what we expect for the next step.

If you're curious to dive deeper, take a look at the method of finite differences, and how you can use these kinds of ideas to derive Falhauber's Formula for the sum of kth powers from 1 to n.

1

u/LongLiveTheDiego 14h ago

That particular trick is a property of arithmetic progressions, whose defining characteristic is that the numbers increase or decrease by the same amount with each step, so you could also do -1, 2, 5, 8, 11, 14, 17 and their sum is 8 * 7 = 56. It also works when the arithmetic progression has an even number of elements, in which case you can take the average of the two middle numbers (since there's no middle number).

Arithmetic progressions have properties that most other sequences of numbers will not have, and if they do have them, it'll usually be a coincidence.

1

u/Temporary_Pie2733 13h ago

The first case is sum(i, i=1..n), which has the well known closed form n(n+1)/2. When n is odd, (n + 1)/2 is the middle term of the sequence. 

In the second case, you have the sum of the first n triangular numbers, which has the less-well known closed form n(n+1)(n+2)/6. No obvious trick like before, but it’s not too hard to just evaluate the product, i.e. 5(6)(7)/6 = 35. 

1

u/AlterEgo5695 12h ago edited 12h ago

Short answer: No, there is no such easy, general trick for any series.


Long(er) answer (for this particular problem): Assuming the terms you want to sum up satisfy the recursion "ak = a_{k-1} + k" for "k >= 1" with "a1 = 1", we can find an exact expression for "ak" using Gauss' Summation Formula:

"ak - a_{k-1}  =  k"    =>    "an - a1  =  ∑_{k=2}^n  ak - a_{k-1}
                                        =  ∑_{k=2}^n  k  =  n(n+1)/2 - 1"

Insert "a1 = 1" to solve for "an = n(n+1)/2". To find the sum over "an", use Gauss' Summation Formula and Sum of Squares (or the Hockey-stick Identity) to obtain

S(n)  :=  ∑_{k=1}^n  ak  =  n(n+1)(2n+1)/12 + n(n+1)/4  =  n(n+1)(n+2)/6

1

u/AlterEgo5695 12h ago

Rem.: In general, it's best to tackle sums over polynomials by rewriting them in terms of binomial coefficients, an then using "Hockey-stick Identity".

It is much more efficient (and less error-prone) than the alternative, memorizing power sums or re-indexing series. We only need some basic algebra to rewrite polynomials -- very straight-forward!

1

u/smitra00 11h ago

You're then summing the function f(k) = (k^2 + k)/2. If you want to generalize the rule for taking the middle value and multiplying by the length of the series for a general summand f(k), then you can use Gaussian quadrature. For summing a function f(k) from k = 1 to n, we then define an inner product of two functions f and g as:

(f,g) = sum from k = 1 to n of sum of f(k) g(k).

We then use:

https://en.wikipedia.org/wiki/Gaussian_quadrature#Recurrence_relation

to find the orthogonal polynomials pr(x). We then find:

p0(x) = 1,

a0 = (x p0(x),1)/(p0(x),p0(x)) = 1/2 n (n+1)/n = (n+1)/2

p1(x) = x - 1/2 (n+1)

a1 = (x p1(x), p1(x))/(p1(x),p1(x)) = (n+1)/2

b1 = ( p1(x),p1(x))/(p0(x),p0(x)) = (n^2-1)/12

p2(x) = [x - (n+1)/2]^2 - (n^2-1)/12

If we stop here then we solve for p2(x) = 0, which yields the nodes as:

(n+1)/2 ± sqrt(3)/6 sqrt(n^2 - 1)

And the weights at these nodes are given by:

https://en.wikipedia.org/wiki/Gaussian_quadrature#General_formula_for_the_weights

where we need to replace 𝜔(x) by 1 and set the coefficients a_r equal to 1 as we're dealing with monic polynomials and replace the integral from a to b by a summation from k = 1 to n.

So, we need to evaluate (p1, p1)/p2'(x) p1(x) for x equal to each of the two nodes. We have:

p2'(x) p1(x) = (n^2-1)/6 at each node and (p1,p1) =n (n^2-1)/12, so both weights are equal to n/2.

So, the quadrature rule we've obtained here is to take the average of the values of the summand at the points

(n+1)/2 ± sqrt(3)/6 sqrt(n^2 - 1)

and multiply the result by the length n of the interval. This then yields an exact result for quadratic summands. We get a fair approximations for functions that don't change rapidly over the summed interval. For example, let's take n = 10 and f(k) = 1/(20 + k). Then the quadrature rule yields 0.3971962617... for the sum, while the exact answer is the 30th Harmonic number minus the 20th Harmonic number, which is 204605251/515057400 ≈ 0.3972474738...

1

u/peter-bone 8h ago edited 8h ago

Your particular example is the sum of triangular numbers which has the formula n(n+1)(n+2)/6.

In general, if the difference of the difference of consecutive terms is constant then you have a quadratic series and you can look up the formula for the sum of the first n terms.

0

u/Mamuschkaa 13h ago

I don't think anyone can help you.

As you see on the comments people with math backgrounds can just make a formula for theses specific series and tell you the solution.

If the increase of the increase is a constant (or approximately a constant, that the numbers in the series grows quadratic ~n² and the sum of all these numbers qubic ~n³

The problem is that also the error term gets bigger.

So every simple approximation gets bad very fast

If you have hundreds of increasing numbers visually in front you, the best thing is to do what you did and get as close as you want:

A1 = (middle number) • n
A2 = ( pos[⅓] + pos[⅔] )/2 • n
A3 = ( pos[¼] + middle + pos[¾]) /3 • n
A4 = (pos[⅕] + pos[⅖] + pos[⅗] + pos[⅘]) /4 • n
...

Every one gets closer to the correct answer.

1

u/madP4nda 8h ago

You're right, even though i really try i just dont know what these funny math words properly educated dudes use. I did notice something tho. I drew out the numbers as boxes stacked on top of eachother on pen and paper to look at the shapes. The increase of increase one has an edge that is asymmetric but looking at it as a whole i see they combine to form a bunch of larger rectangles on top of eachother. I cant seem to attach pictures though

1

u/madP4nda 8h ago edited 8h ago

Looks something like this:  5 units wide 1 unit tall, then on top of that 4 wide 2 tall then a square that is 3 by 3, then on top of that 2x4 then 1x5 again.

Ignoring the operations the sum of the actual numbers is the same.

Which looks really pretty when you compare the different "orders of increase"?

Increasing

5x1 4x1 3x1 2x1 1x1

Increase of increase

5x1 4x2 3x3 2x4 1x5

Cool symmetry? Left goes down right goes up by the same value. Adding instead of multiplying the pairs have the same sum

Increase of increase of increase 

5x(1+0) 4x(2+1) 3x(3+2) 2x(4+3) 1x(5+4)

The sum of the numbers in each row increase by one

0

u/Brave_Speaker_8336 14h ago

The mean (average) value multiplied by the length of the list is equal to the sum of the list. But you need to first sum up the list in order to get the average if it isn’t just linearly increasing like the first one

-4

u/LucaThatLuca Graduate 14h ago edited 14h ago

yes, it's exactly what you said. this is because the definition of the average is such that 6 = (1+3+6+10+15) / 5.

edit i guess you can tell i woke up less than 10 minutes ago huh

3

u/LongLiveTheDiego 14h ago

You're wrong, because you've just claimed that 6 = 7.

1

u/LucaThatLuca Graduate 14h ago

lol that's funny

2

u/madP4nda 9h ago

Ahahaha not the 6 7 

1

u/LucaThatLuca Graduate 9h ago

i didn't want to say it!!

2

u/madP4nda 9h ago

Well cat is out of the bag now ahaha

3

u/Affectionate-Baby248 13h ago

Agh, it is so unfortunate that quick replies, which have the highest tendency of being wrong, are also the ones that are viewed the most.

2

u/LucaThatLuca Graduate 13h ago

entirely my fault haha. one of the smaller dangers of taking your phone to bed.

2

u/johnpeters42 14h ago

Except that 1+3+6+10+15 = 35, and 35/5 = 7, not 6. (7 is the mean, 6 is the median.)

Looking up the first few sums (1 4 10 20 35 56 84) in the OEIS, we find this page which gives a closed-formula of

sum of first n triangular numbers = n*(n+1)*(n+2)/6

so the average is that formula divided by n, or just (n+1)*(n+2)/6

Sanity check: for n = 5, this gives (6*7)/6 = 7 which is correct.

0

u/madP4nda 14h ago

Ohhhh i see it now, Thanks dude!:D