Find the sum of all positive integers that are coprime to .
Details and assumptions
Two integers and are said to be coprime if .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
All we are supposed to do is to find sum of numbers till 1000 which are neither divisible by 2 nor by 5 ( Prime factors of 1000 ).
S=(Sum of first 1000 natural numbers)-(Sum of natural numbers ≤ 1000 divisible by 2)-(Sum of natural numbers ≤ 1000 divisible by 5)+(Sum of natural numbers ≤ 1000 divisible by 10)
⟹ S = S 1 0 0 0 − 2 S 5 0 0 − 5 S 2 0 0 + 1 0 S 1 0 0 where S i denotes sum of first i natural numbers.
Using the formula S i = 2 i ( i + 1 ) , we will get S = 2 0 0 0 0 0