I can't understand the line that covered by red. also can someone tell me the formula's name or it's proof.
Thanks for any future comments :)
# | User | Rating |
---|---|---|
1 | jiangly | 3976 |
2 | tourist | 3815 |
3 | jqdai0815 | 3682 |
4 | ksun48 | 3614 |
5 | orzdevinwang | 3526 |
6 | ecnerwala | 3514 |
7 | Benq | 3482 |
8 | hos.lyric | 3382 |
9 | gamegame | 3374 |
10 | heuristica | 3357 |
# | User | Contrib. |
---|---|---|
1 | cry | 169 |
2 | -is-this-fft- | 166 |
3 | Um_nik | 161 |
3 | atcoder_official | 161 |
5 | djm03178 | 157 |
6 | Dominater069 | 156 |
7 | adamant | 154 |
8 | luogu_official | 152 |
9 | awoo | 151 |
10 | TheScrasse | 147 |
I can't understand the line that covered by red. also can someone tell me the formula's name or it's proof.
Thanks for any future comments :)
Name |
---|
I can't delete this comment...
https://nrich.maths.org/2478
You can find the formula in a manner similar to proving
1+2+3+4+..+n = n*(n+1)/2
Thanks
This is an arithmetic series. usually you can evaluate sequences x, x+d, x+2d, ... x+(n-1)*d by using the fact that x + x+(n-1)*d (simply pairing up the first and nth terms) equals x+d + x+(n-2)*d, + etc so basically you can just find the average of each element, which is (x+x+(n-1)*d) /2 * number of terms
Thanks
Hope it helps!
In second line when we take (b-a+1) as common factor isn't it look like that (b-a+1)*(a+b-a)/2 ? how does it become (a+b)
Ah it's clear now Thanks