The sum S of positive even integers starting from 2 to n (even) is described as :
S = 2 + 4 + 6 + 8 +… n where the last element n is even.
Questions:
f(n=2m) = S = 2+4+6+ ... +2m // by definition of f and change of variable, n= 2m
= 2*(1 + 2 + 3 + ... + m) // common factor of 2
= 2(m*(m+1)/2) // by sum of the m first integers
= m(m+1) // simplification
= (n/2)((n/2)+1) // by our definition of m
f(5298) = f( 2* 2649) = 2649*2650 = 7 019 850
f(n=2m) = S = 2+4+6+ ... +2m // by definition of f and change of variable, n= 2m
= 2*(1 + 2 + 3 + ... + m) // common factor of 2
= 2(m*(m+1)/2) // by sum of the m first integers
= m(m+1) // simplification
= (n/2)((n/2)+1) // by our definition of m
f(5298) = f( 2* 2649) = 2649*2650 = 7 019 850
Bravo Michel, you get it!