Calculate the sum of all even integers from 4 to 100 inclusively, and then subtract from it the sum of all multiples of 6 from 6 to 96.
(a) the sum of all even integers from 4 to 100 inclusively is 4 + 6 + 8 + . . . + 100 == 2548. (49 is the number of terms in this arithmetic progression). (b) the sum of all multiples of 6 from 6 to 96 inclusively is 6 + 12 + 18 + . . . + 96 = = 816. (16 is the number of terms in this arithmetic progression). In both cases (a) and (b), I applied the formula for the sum of the first "n" terms of an arithmetic progression. (c) The difference 2548 - 816 = 1732 is your ANSWER.
Number of EVEN numbers, from 4 to 100, inclusive:
Sum of the 49 EVEN numbers, from 4 to 100, inclusive:
Number of EVEN numbers, from 4 to 100, inclusive, that're MULTIPLES of 6 (2 * 3):
Sum of the 16 EVEN numbers, from 4 to 100, inclusive, that're MULTIPLES of 6:
Sum of ALL EVEN numbers, from 4 to 100, inclusive, that're NOT MULTIPLES of 6: