[Math] Positive integers less than $N$ not divisible by $4$ or $6$

combinatorics

How many positive integers less than $N$ are not divisible by $4$ or $6$ for some $N$?

Best Answer

Form three arithmetic sequences:

1.- Numbers that are divisible by $\,4\,$ and less or equal than $\,400\,$:

$$4,8,12,...\Longrightarrow a_1=4\,\,,\,d=4\Longrightarrow a_n=a_1+(n-1)d=4+(n-1)4\leq 400\Longrightarrow n\leq 100$$

2.- Numbers that are divisible by $\,6\,$ and less or equal than $\,400\,$:

$$6,12,18,...\Longrightarrow a_1=6\,\,,\,d=6\Longrightarrow a_n=6+(n-1)6\leq 400\Longrightarrow n\leq66$$

3.- Numbers that are divisible by $\,4\,$ and $\,6\,$ and less or equal than $\,400\,$:

$$12,24,36,...\Longrightarrow a_1=12\,\,,\,d=12\Longrightarrow a_n=12+(n-1)12\leq 400\Longrightarrow n\leq 33$$

Well, take it now from here: how many positive integers less than $\,400\,$ are not divisible by $4\,,\,6\,$?