Obtain the sum of all integers in the first 1000 integer which are neither divisible by 5 nor by 2
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.
the number which are not divided on 5 nor 2 are 1,3,7,9,11,13,17,19,21,23,27,29....991,993,997,999 required sum is =1+3+7+9+11+13+17+19+21+23+27+29+.......+991+993+997+999 now (1+11+21+.....+991)+(3+13+23+.....+993)+(7+17+27+.....+997)+(9+19+29+...+999) in each group the number of term are same let xn = a + d(n-1) xn =991 d=11 1=10 a=1 991=1+10(n 1) n=100 thus required sum is S = (n/2) × (2a + (n-1)d) now put the values S=[100/2(2+(99)10]+[100/2(2(3)+(99)10]+[100/2(2(7)+(99)10]+[100/2(2(9)+(99)10] =50[2+990+6+990+14+990+18+990] S=200,000