Not a trained mathematician, but this seems to work consistently

  • Thread starter stoneange
  • Start date
  • #1
2
1
To calculate the sum of numbers between to set integers, at any separation, without adding individually.

End set number times ( ½ End set number divided by Separation increment) plus ½ End Set number
E ( ½E / S ) + ½E = SUM

For example:

• To calculate all whole numbers 1 – 100 (i.e. 1 +2 +3 +4, etc…)

• 100 ( 50 / 1 ) + 50 = 5050


This formula works with any separation increment, for example:

• To calculate whole numbers in separation increments of 5 from 1 – 100 (i.e. 5+10+15, etc…)

• 100 (50/ 5) + 50 = 1050
 

Answers and Replies

  • #2
15,377
13,400
The sum ##1+2+\ldots+ n## is always ##\dfrac{n\cdot (n+1)}{2}##.

All other cases follow from this.
 
  • Like
Likes sysprog and Klystron
  • #3
DrGreg
Science Advisor
Gold Member
2,349
1,216
To prove it, trying writing the same sum forwards and backwards and add them together, e.g.
$$\begin{align*}
(1 + 3 + 5 + 7 &) \\
+ (7 + 5 + 3 + 1 &) \\
= 8 + 8 + 8 + 8 &= 4 \times 8
\end{align*}
$$
But you've counted each number twice, so divide by two: ##\tfrac{1}{2} \times 4 \times 8.##

Now see how that relates to your formula.
 
  • #4
2
1
The sum ##1+2+\ldots+ n## is always ##\dfrac{n\cdot (n+1)}{2}##.

All other cases follow from this.

Thank you. How would that work with non-consecutive series, such as 5+10+15...100?
 
  • #5
berkeman
Mentor
60,386
10,687
Thank you. How would that work with non-consecutive series, such as 5+10+15...100?
Did you understand the trick that @DrGreg described above in post #3? How would you apply it to the sum you just posted? :smile:
 
  • #6
DrGreg
Science Advisor
Gold Member
2,349
1,216
Thank you. How would that work with non-consecutive series, such as 5+10+15...100?
$$5 +10 + 15 + ... + 100 = 5 \times \left(1 + 2 + 3 + ... +\frac{100}{5} \right)$$
 
  • Like
Likes Delta2 and berkeman
  • #7
PeroK
Science Advisor
Homework Helper
Insights Author
Gold Member
2020 Award
18,153
9,824
Thank you. How would that work with non-consecutive series, such as 5+10+15...100?
That's ##5 \times (1 + 2 + \dots + 20)##, surely?
 
  • Like
Likes SammyS and pbuk
  • #8
167
12
Thank you. How would that work with non-consecutive series, such as 5+10+15...100?
Here's general formula for these types of problems.

To generate terms in any regularly spaced series, use: mth term = a + m * c, where m = {0, 1, 2, 3, ...}. Applying to your series it looks like this:

a + 0c = 5, solve for a, a = 5
a + 1c = 10, solve for c, c = 5
a + 2c = 15, 5 + 2 * 5 = 15
a + 3c = 5 + 3 * 5 = 20
etc

Summing the term generator looks like this
a + 0c +
a + 1c +
a + 2c +
... +
a + mc =

a(m + 1) + c(0 + 1 + 2 ... + m) =
a(m + 1) + cm(m + 1) / 2 =
(m + 1)(a + cm/2)

Testing with your example 5 + 10 + 15 + 20 + 25
solve for m
5 + 5m = 25
5m = 20
m = 4

using formula
sum = (4 + 1)(5 + 5 * 4/2) = 5 * 15 = 75

checking manually
sum = 5 + 10 + 15 + 20 + 25 = 75

Correct

With another, less obvious series
1 + 7 + 13 + 19 + 25 + 31 + 37 = 133
a + 0c = 1, a = 1
a + 1c = 7, c = 6
a + mc = 37
1 + 6m = 37
6m = 36
m = 6

plugging into sum formula
(6 + 1)(1 + 6 * 6 / 2) = 7 * 19 = 133
 
  • #9
2,120
1,304
Karl Gauss elicidated this when he was a young schoolboy -- the teacher had assigned the class to add up the integers from 1 to 100 -- Gauss immediately wrote 5050 on his slate -- the teacher became infuriated because he had himself arrived at a different answer -- Gauss was sent to the Headmaster's Office, where he explained that the sum was of a set of pairs each of which was equal to 101 -- 1 and 100, 2 and 99, 3 and 98, and so on until 50 and 51, so that, there being 50 such pairs, and 50 times 101 being 5050, that was the answer - they sent the kid to college early . . .
 
  • #10
WWGD
Science Advisor
Gold Member
5,631
5,063
Thi
Thank you. How would that work with non-consecutive series, such as 5+10+15...100?
This is just an arithmetic progression ( AP). Factor out the 5 see what you get. Edit: In general, for an AP, your terms are of the form:
a+(a+r)+(a+2r)+.....+(a+(n-1)r).

Can you find its sum?
 

Related Threads on Not a trained mathematician, but this seems to work consistently

Replies
3
Views
509
Replies
8
Views
3K
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
11
Views
12K
Replies
5
Views
12K
  • Last Post
Replies
19
Views
2K
  • Last Post
Replies
3
Views
1K
  • Last Post
Replies
4
Views
2K
Replies
4
Views
1K
Top