Sum of Coprimes to 1000

Find the sum of all positive integers that are coprime to 1000 1000 .

Details and assumptions

Two integers a a and b b are said to be coprime if gcd ( a , b ) = 1 \text{gcd}(a,b)=1 .


The answer is 200000.

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.

2 solutions

Pranjal Jain
Oct 26, 2014

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 \leq 1000 divisible by 2)-(Sum of natural numbers \leq 1000 divisible by 5)+(Sum of natural numbers \leq 1000 divisible by 10)

S = S 1000 2 S 500 5 S 200 + 10 S 100 \implies S=S_{1000}-2S_{500}-5S_{200}+10S_{100} where S i S_{i} denotes sum of first i natural numbers.

Using the formula S i = i ( i + 1 ) 2 S_{i}=\frac{i(i+1)}{2} , we will get S = 200000 S=\boxed{200000}

Dinesh Padisetti
Oct 26, 2014

take out all even numbers and odd multiples of 5

from the numbers 1...1000

sum of all odd numbers upto 1000 is :

500^2

sum of all odd multiples of 5 which are 100 numbers is 5*(100^2)

500^2 - 5 (100^2) = (25-5) 100^2 = 200000

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...