Originally Posted by

**Joel** If *n*, *a* are positive integers, how many integers from 1 to *n* are divisible by [I]a?

Hi **Joel**.

The answer is $\displaystyle \left\lfloor\frac na\right\rfloor$ where $\displaystyle \lfloor x\rfloor$ denotes the greatest integer not greater than $\displaystyle x.$

Proof:

Use the division algorithm and write $\displaystyle n=qa+r$ where $\displaystyle 0\le r<a.$ Now any integer divisible by $\displaystyle a$ is of the form $\displaystyle ka$ for some integer $\displaystyle k.$ We have

$\displaystyle 1\le ka\le n$

$\displaystyle \implies\ ka\le qa+r<qa+a=(q+1)a$

$\displaystyle \implies\ k<q+1$

$\displaystyle \implies\ k\le q$

Conversely $\displaystyle k\le q\ \implies\ 1\le ka\le qa.$ Hence there are exactly $\displaystyle q$ integers from 1 to $\displaystyle n$ which are divisible by $\displaystyle a.$

And $\displaystyle \left\lfloor\frac na\right\rfloor=\left\lfloor q+\frac ra\right\rfloor=q$ as $\displaystyle q$ is an integer and $\displaystyle 0\le\frac ra<1.$ This completes the proof.