We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
If you understand arithmetic progression that result should not need further explanation. The link provided gives a proof of the arithmetic series, you should read it.
In this sequence, Sn = 1 + 3 + 5 + ...+ 2n-1, the first item is 1, the last item is (2n-1), there are altogether n items in the sequence. If you are asking how to sum all the items in an arithmetic progression, I can give you an example, 1+ 2 + ... + 100, you can see that 1+100 = 101, 2 + 99 = 101, 3 + 98 = 101, ... 49+ 52 = 101, 50 + 51 = 101, so you just need to pair the first and last item, and how many pairs are there? 50 pairs, so the sum is (1+100) * 100/ 2; I cannot think any more to explain this to you but I really think that link is sufficient enough
It's actually defined as n(n+1)/2, because if the series has an odd number of elements, then the center element needs to be added in hence:
summish(3) = 1 + 1 + 2 + 2 + 3 + 3 / 2 = (3)(3+1) / 2 = 12 / 2 = 6
To find the sum of numbers in an airthmetic progression,you have a defined formula which can be proved. sum of progression = n/2*(1st term + last term); where n stands for total number of terms in that series.
Is there a need to calculate for Tn = 2n-1? As far as I can see the sequence resolves to Sn = n2 as all the other terms cancel out and (n-1)2 for t1 is zero. Wouldn't this give constant time solution? Or am I missing something?
formula of sum of AP series (which is 1,3,5,...,2*n-1)
n/2*(a+(n-1)*d)
given d=2 and a=1(as a first term and d is difference between two numbers in the series)
which makes above equation n*n
Summing the N series
You are viewing a single comment's thread. Return to all comments →
NO NEED to calculate every term, notice that Tn = 2n-1, thus Sn = 1 + 3 + 5 + ...+ 2n-1= (1+2n-1) * n / 2 = n*n.
For those wondering why,
Okay, I get why
T_n = 2n - 1
, basic square expansion. But from that, how do you calculateΣ_n
?have no idea what you are trying to do...the result is n*n, that's all
I'm trying to understand where does this
n*n
comes from / how did you get there , connecting the dots from the fact thatT_n = 2n - 1
till your resultthat's what I don't get how do you reach to this
https://en.wikipedia.org/wiki/Arithmetic_progression
Thanks, I know what an arithmetic progression is but could you explain how do you get this
(1+2n-1) * n / 2
If you understand arithmetic progression that result should not need further explanation. The link provided gives a proof of the arithmetic series, you should read it.
But! If than answer isn't sufficient for you... proof by induction.
very nice, i havent seen a proof by induction in ages!
Yeah, I like this proof better too... The other one is just overcomplicating things
In this sequence, Sn = 1 + 3 + 5 + ...+ 2n-1, the first item is 1, the last item is (2n-1), there are altogether n items in the sequence. If you are asking how to sum all the items in an arithmetic progression, I can give you an example, 1+ 2 + ... + 100, you can see that 1+100 = 101, 2 + 99 = 101, 3 + 98 = 101, ... 49+ 52 = 101, 50 + 51 = 101, so you just need to pair the first and last item, and how many pairs are there? 50 pairs, so the sum is (1+100) * 100/ 2; I cannot think any more to explain this to you but I really think that link is sufficient enough
Thanks, I had forgotten there's a rule that the sum of a progression is always n*(firstelement+lastelement)/2 . Now things are clear.
It's actually defined as n(n+1)/2, because if the series has an odd number of elements, then the center element needs to be added in hence: summish(3) = 1 + 1 + 2 + 2 + 3 + 3 / 2 = (3)(3+1) / 2 = 12 / 2 = 6
To find the sum of numbers in an airthmetic progression,you have a defined formula which can be proved. sum of progression = n/2*(1st term + last term); where n stands for total number of terms in that series.
Elementary mathematics... Σn= n(n+1)/2 Σ1 = n
use A P summation formula n/2(2a+(n-1)d)
sum of natural no is n*(n+1)/2 therefore that of 2n-1 is n(n+1)-1
Σn=(n)(n+1)/2 Σ(2n-1)=Σ(2n)-Σ(1) = 2Σn- n= 2n(n+1)/2 -n =n*n
Isn't that a little overcomplicated?
S_n = (n^2 - (n-1)^2) + ((n-1)^2 - (n-2)^2) + ... + (1 - 0)
The only terms in this sum that don't cancel are the first and last: n^2 and 0.
Partial sums arrive at the same answer but I think the above logic is what the question is contructed around.
Indeed :)
I also did it this way, telescoping sums for the win
Is there a need to calculate for Tn = 2n-1? As far as I can see the sequence resolves to Sn = n2 as all the other terms cancel out and (n-1)2 for t1 is zero. Wouldn't this give constant time solution? Or am I missing something?
formula of sum of AP series (which is 1,3,5,...,2*n-1) n/2*(a+(n-1)*d) given d=2 and a=1(as a first term and d is difference between two numbers in the series) which makes above equation n*n