Return the sum of numbers depending on number count?

clarense2

New member
Joined
Sep 23, 2023
Messages
1
Hithere,

I have the following challenge.
Some pointers first:
For e.g. a sequence of whole numbers beginning with 1 and ending with 4, the sum will be 10. (1+2+3+4)
For a sequence from 1-6 the sum will be 21.
The sequence I want this formula to work on will always start with 1.

So a sequence that adheres to the above and contains 4 numbers (1,2,3,4) will have the sum of 10.
A sequence that adheres to the above and contains 6 numbers (1,2,3,4,5,6) will have the sum of 21.

What I am looking for is a formula that will output the sum of the count of numbers.
What I mean by this is that if you would input 4, it will return 10. If you input 6, it returns 21. Etc.

Can this be done?

T.I.A.!
 
I have the following challenge.
Some pointers first:
For e.g. a sequence of whole numbers beginning with 1 and ending with 4, the sum will be 10. (1+2+3+4)
For a sequence from 1-6 the sum will be 21.
The sequence I want this formula to work on will always start with 1.

So a sequence that adheres to the above and contains 4 numbers (1,2,3,4) will have the sum of 10.
A sequence that adheres to the above and contains 6 numbers (1,2,3,4,5,6) will have the sum of 21.

What I am looking for is a formula that will output the sum of the count of numbers.
What I mean by this is that if you would input 4, it will return 10. If you input 6, it returns 21. Etc.

Can this be done?
You mean a sequence of successive whole numbers. And you want the sum of the series consisting of those numbers.

Try searching for "triangular numbers"; or, more generally, for "arithmetic series".

Or, since it's a challenge for you (not just something to look up), here's a hint for solving it yourself:

What happens if you add the sequences 1, 2, 3, 4 and 4, 3, 2, 1, term by term? How could you calculate the sum of all four resulting numbers?​
 
Similarly - extending the idea of response #2,

What happens if you add the sequences 1, 2, 3, 4, 5, 6 and 6, 5, 4, 3, 2, 1, term by term? How could you calculate the sum of all six resulting numbers?

Can you extend the same operation to 'n' numbers?
 
Add S = n + (n-1) + (n-2) + ... + 3 + 2 + 1 to S = 1 + 2 +3 + ... + (n-2) + (n-1) + n.
Then 2S equals?? So S equals?
 
Top