## Task 4 - 230834

Determine the number of all those natural numbers from 1 to 1984 that are divisible by 5, but not by 7 and not by 11!
For every natural number $n>0$:

If we go through the natural numbers from 1 to 1984 in sequence, then every $n$-th number is always divisible by $n$. From this it follows:

The number of numbers divisible by $n$ among the numbers from 1 to 1984 is the quotient that appears when 1984 is divided by $n$. This is repeatedly applied in the following:

Because 1984: $5=396$, remainder 4, there are exactly 396 numbers among the numbers from 1 to 1984 that are divisible by 5.

Among them, however, are also those numbers that, in addition to being divisible by 5, are also divisible by 7 and thus (since 5 and 7 are coprime) by 35. Because $1984: 35=56$, remainder 24, there are exactly 56 such numbers.

Furthermore, among the numbers divisible by 5, all those were counted that, in addition to being divisible by 5, are also divisible by 11 and thus (since 5 and 11 are coprime) by 55. Because 1984:55=35, remainder 4, there are exactly 36 such numbers.

If we now subtract from the number 396 the numbers 56 and 36 determined subsequently, then the numbers that are divisible by 5 as well as by 7 and by 11 and thus (due to the pairwise coprimality of 5, 7, and 11) by 385 are counted twice. Because 1984 : 385 $=5$, remainder 59, there are exactly 5 such numbers.

Therefore, there are 396 - 56 - $36+5=309$ numbers among the natural numbers from 1 to 1984 that are divisible by 5, but not by 7 and not by 11.