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:
n = 1; f(n) = 2 = 1 + 1^2
n = 2; f(n) = 6 = 2 + 2^2
n = 3' f(n) = 12 = 3 + 3^2
n = 4; f(n) = 20 = 4 + 4^2
...
So general formula is f(n) = n + n^2
Sum with n = 5298 is therefore 28,074,102
Oh wait, maybe I haven't quite got this right. My n is the number in the sequence. If the n in the question refers to the actual even integer, then I would have to divide this by 2 to get the position in the sequence. In that case, the answer would be 7,019,850, as 5298 is the 2649th number in the sequence of even integers >0. In this case I concur with Gaetano.
Oh wait, maybe I haven't quite got this right. My n is the number in the sequence. If the n in the question refers to the actual even integer, then I would have to divide this by 2 to get the position in the sequence. In that case, the answer would be 7,019,850, as 5298 is the 2649th number in the sequence of even integers >0. In this case I concur with Gaetano.
Good on time catch Martin! Yes, it is easy to confuse the number in the sequence and the even integer itself! Congrats!