Find the Sum of those integers from 1 to 500 which are multiples of 2 or 5.
Since, multiples of 2 or 5 = Multiple of 2 + Multiple of 5 – Multiple of LCM (2, 5) i.e., 10.
Multiples of 2 or 5 from 1 to 500 = List of multiple of 2 from 1 to 500 + List of multiple of 5 from 1 to 500 - List of multiple of 10 from 1 to 500
= (2, 4, 6, …, 500) + (5, 10, 15, …, 500) - (10, 20, 30, …., 500)
All of these list form an AP.
And
Required sum = sum(2, 4, 6, …., 500) + sum(5, 10, 15, …, 500) - sum(10, 20, 30, …., 500)
Consider series
2, 4, 6, …., 500
First term, a = 2
Common difference, d = 2
Let n be no of terms
an = a + (n - 1)d
500 = 2 + (n - 1)2
498 = (n - 1)2
n - 1 = 249
n = 250
let the sum of this AP be S1 using the formula,
S1 = 125(502)
S1 = 62750 [ eqn 1]
Now, Consider series
5, 10, 15, …., 500
First term, a = 5
Common difference, d = 5
Let n be no of terms
By nth term formula
an = a + (n - 1)d
500 = 5 + (n - 1)
495 = (n - 1)5
n - 1 = 99
n = 100
Let the sum of this AP be S_2 using the formula,
S2 = 50(505)
S2 = 25250 [ eqn 2]
Consider series
10, 20, 30, …., 500
First term, a = 10
Common difference, d = 10
Let n be no of terms
an = a + (n - 1)d
500 = 10 + (n - 1)10
490 = (n - 1)10
n - 1 = 49
n = 50
Let the sum of this AP be S1 using the formula,
S3 = 25(510)
S3 = 12750 [ eqn 3]
So required Sum = S1 + S2 - S3
= 62750 + 25250 - 12750
= 75250