# Find the sum of the integers between 100 and 200 that are not divisible by 9

#### Complete Python Prime Pack

9 Courses     2 eBooks

#### Artificial Intelligence & Machine Learning Prime Pack

6 Courses     1 eBooks

#### Java Prime Pack

9 Courses     2 eBooks

Given:

Integers between 100 and 200 that are not divisible by 9.

To do:

We have to find the sum of the integers between 100 and 200 that are not divisible by 9.

Solution:

Sum of the integers between 100 and 200, which are not divisible by 9 $=$ Sum of the integers between 100 and 200 $-$ Sum of the integers between 100 and 200, which are divisible by 9

Integers between 100 and 200 are $101,102,103, \ldots, 199$.

The sequence is in A.P.

Here,

$a=101$ and $d=102-101=1$ $l=199$

We know that,

$l=a+(n-1) d$

$\Rightarrow 199=101+(n-1) \times 1$

$\Rightarrow 199=101+n-1$

$\Rightarrow 199-100=n$

$\Rightarrow n=99$

$\mathrm{S}_{n}=\frac{n}{2}[2 a+(n-1) d]$

$=\frac{99}{2}[2 \times 101+(99-1) \times 1]$

$=\frac{99}{2}[202+98 \times 1]$

$=\frac{99}{2}(202+98)$

$=99 \times 150$

$=14850$

Integers between 100 and 200, which are divisible by 9 are $108,117,126, \ldots, 198$.

The sequence is in A.P.

Here,

$a=108$ and $d=117-108=9$

$l=198$

We know that,

$l=a+(n-1) d$

$\Rightarrow 198=108+(n-1) \times 9$

$\Rightarrow 198=108+9n-9$

$\Rightarrow 198-99=9 n$

$\Rightarrow n=\frac{99}{9}=11$

Therefore,

$n=11$

$\mathrm{S}_{n}=\frac{n}{2}[2 a+(n-1) d]$

$=\frac{11}{2}[2 \times 108+(11-1) \times 9]$

$=11[108+5 \times 9]$

$=11(108+45)$

$=11 \times 153$

$=1683$

Therefore,

Sum of all integers between 100 and 200, which are not divisible by 9 $=14850-1683$

$=13167$

The sum of all integers between 100 and 200 which are not divisible by 9 is $13167$.

Updated on 10-Oct-2022 13:27:44