AP! Wait, think again...

Algebra Level 2

Find the sum of all natural numbers from 1 through 1000 which are neither divisible by 5 nor by 2.


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.

7 solutions

We will start with finding the sum of all multiples of 2 or 5...

sum of all multiples of 2 is

500 2 ( 2 + 1000 ) \frac{500}{2}(2+1000)

= 250500 =250500

sum of all multiples of 5 is

200 2 ( 5 + 1000 ) \frac{200}{2}(5+1000)

= 100500 =100500

Now you will observe that numbers 10,20....i.e all the multiples of 10 occur in both the sum of the multiples of 2 and 5...

Therefore we must subtract the sum of all multiples of 10.

Sum of all multiples of 10 is

100 2 ( 10 + 1000 ) \frac{100}{2}(10+1000)

= 50500 =50500

Thus, sum of numbers which are divisible by 2 OR 5 is

= 250500 + 100500 100500 =250500+100500-100500

= 300500 =300500

Now if we subtract the above sum from the sum of all natural numbers up to 1000 we will get the desired result..

Sum of natural no. up to 1000 is

1000 2 ( 1001 ) \frac{1000}{2}(1001)

= 500500 =500500

Therefore,

Sum of all numbers which are neither divisible by 5 or 2 are

= 500500 300500 =500500-300500

200000 \huge{200000}

simple and understandable....thank u :)

Maitri Mishra - 6 years, 5 months ago

stupid me - forgot to subtract the multiples of 2 and 5

Steven Linnell - 4 years, 2 months ago

There is an typo below: "Thus, sum of numbers which are divisible by 2 OR 5 is".

Think you meant to subtract 50500 instead of 100500 😉

Tom Stein - 2 years ago
Aareyan Manzoor
Dec 20, 2014

to find the desired answer, n = 1 1000 ( n ) i = 1 1000 2 ( 2 i ) k = 1 1000 5 ( 5 k ) + z = 1 1000 5 × 2 ( 5 × 2 z ) \sum_{n=1}^{1000} (n) -\sum_{i=1}^{\dfrac{1000}{2}} (2i) -\sum_{k=1}^{\dfrac{1000}{5}} (5k)+\sum_{z=1}^{\dfrac{1000}{5\times 2}} (5\times2 z) = n = 1 1000 ( n ) 2 i = 1 500 ( i ) 5 k = 1 200 ( k ) + 10 z = 1 100 ( z ) =\sum_{n=1}^{1000} (n) -2\sum_{i=1}^{500} (i) -5\sum_{k=1}^{200} (k)+10\sum_{z=1}^{100} ( z) we know x = 1 n ( x ) = n ( n + 1 ) 2 \sum_{x=1}^n (x) =\dfrac{n(n+1)}{2} ,now substitute = 1000 × 1001 2 2 500 × 501 2 5 200 × 201 2 + 10 100 × 101 2 =\dfrac{1000\times 1001}{2}-2\dfrac{500\times 501}{2}-5\dfrac{200\times 201}{2}+10\dfrac{100\times 101}{2} = 500 × 1001 500 × 501 500 × 201 + 500 × 101 =500\times 1001 -500 \times 501 -500\times 201 +500\times 101 = 500 ( 1001 501 201 + 101 ) = 500(1001-501-201+101) = 500 × 400 = 5 × 4 × 10000 = 200000 =500 \times 400 =5\times 4\times 10000 =\boxed{200000}

for 1 to 10 1,3,7,9 This repeats for every next 10 digits

1+3+7+9 =20 , 11+13+17+19=20 + 40, 21+23+27+29=80+20 .........

so totally 20 + sum{n=1 to 99} of (40n+20) = 20 + 199980 = 200000

The famous tip...

Leonblum Iznotded - 2 years, 10 months ago
Denis Husadzic
Jan 27, 2018

From all the positive integers less or equal than 1000 1000 first exclude all the even numbers and than all the odd numbers divisible by 5 5 to get that the sum is S = ( 1 + 3 + 5 + + 999 ) ( 5 + 15 + + 995 ) = ( 1 + 3 + + 999 ) 5 ( 1 + 3 + + 199 ) . S = (1+3+5+\ldots + 999) - (5+15+\ldots + 995) = (1+3+\ldots + 999) - 5(1+3+\ldots +199).

Now, we can use formula 1 + 3 + + ( 2 n 1 ) = n 2 1 + 3 + \ldots + (2n-1) = n^2 to get S = 50 0 2 5 10 0 2 = ( 5 2 5 ) 10 0 2 = 20 10000 = 200000. S = 500^2 - 5\cdot 100^2 = (5^2 - 5)\cdot 100^2 = 20\cdot 10000 = 200000.

Rocco Dalto
Jan 29, 2017

Let S S be the sum of all natural numbers from 1 through 1000 which are neither divisible by 5 nor by 2.

j = 1 500 2 j 1 = ( 500 ) 2 \sum_{j = 1}^{500} 2 * j - 1 = (500)^2

and,

5 j = 1 100 2 j 1 = 5 ( 100 ) 2 5 * \sum_{j = 1}^{100} 2 * j - 1 = 5 * (100)^2

S = 50 0 2 5 ( 100 ) 2 = 20 1 0 4 = 200000 \implies S = 500^2 - 5 * (100)^2 = 20 * 10^4 = 200000

Jeremy Yeo
Nov 9, 2014

Notice that the sum of all natural numbers between 1-1000 (both inclusive), which are neither divisible by 5 nor by 2 is simply:

Sum of all natural numbers between 1-1000 (both inclusive) - Sum of all multiples of 5 between 1-1000 (both inclusive) - Sum of all multiples of 2 between between 1-1000 (both inclusive) + Sum of all multiples of 10 between 1-1000 (both inclusive)

Therefore the answer is ( 1+2+3+...+1000) - (5+10+15+...+1000) - (2+4+6+...+1000) + (10+20+30+...+1000)

= (1000*1001)/2 - [5(200)(201)]/2 - [2(500)(501)]/2 + [10(100)(101)]/2

= [1000(1001-201-501+101)]/2

=500(400)

=200000

Avn Bha
Nov 7, 2014

i figured out 2 solutions to this problem- 1) form the series then take the sum of the first four terms .subsequently the sum of these sums form an AP then proceed with calculations

2) find the sum of odd numbers up to 1000 then subtract the sum of the multiples of 5 which are not divisible by 10.

I used 2nd method of yours. Just wanted to correct you a bit that in 2nd point we have to find the sum of odd numbers form 1 to 1000 but then we don't have to subtract all multiples of 5. We only have to subtract those multiples of 5 which are not divisible by 10 or in other words end in digit 5 like 5, 15, 25,.........., 995.

Kushagra Sahni - 6 years, 7 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...