2

For $n \leq 1000$ I am interested in the integers who are divisible by 4 but not by 3 and 16. Say $a_i$ is the property that an integer is divisible by $i$. Inclusion-Exclusion gives us: \begin{align} N(a_{3}'a_{4}a_{16}') = N - N(a_3) - N(a_4') - N(a_{16}) + N(a_3a_4') + N(a_3a_{16}) + N(a_4'a_{16}) - N(a_{3}'a_{4}a_{16}') \end{align} I can determine those first 4 terms correctly:

• N = 1000

• $N(a_3)= \lfloor \frac{1000}{3} \rfloor = 333$

• $N(a_4')= 1000 - \lfloor \frac{1000}{4} \rfloor = 750 $

• $N(a_{16})= \lfloor \frac{1000}{16} \rfloor = 62$

Now it is becoming harder to working things out. We can say for $N(a_3a_4')$ that those are all the numbers that are divisible by 3 but not by 4. We can again apply inclusion-exlusion on this term but it don't seem to help. How can I work this out?

iJup
  • 1,999
  • 12
    How can an integer be divisible by 16 but not by 4? – paul garrett May 21 '15 at 20:39
  • A divisor of a divisor is a divisor. – Bernard May 21 '15 at 20:41
  • It's going to take a while to find an integer divisible by $;16;$ but not by $;4;$ ... – Timbuc May 21 '15 at 20:41
  • Sorry there is some mistake in the question. I will edit. – iJup May 21 '15 at 20:42
  • There is a joke here. There are formulae which work if the numbers are relatively prime in some appropriate sense. You can plug the numbers in every time, but the precondition counts. – Mark Bennet May 21 '15 at 20:46
  • @Timbuc Just for fun, is infinity divisible by every integer, by none ... ?? – Mark Bennet May 21 '15 at 20:48
  • @MarkBennet Well, just for fun: tell me first what is infinity and whether it is odd or even...:) – Timbuc May 21 '15 at 20:49
  • 1
    You mean "divisible by 4, but not by both 3 and 16"? – Matt Gutting May 21 '15 at 20:52
  • @Timbuc The infinity I believe in is divisible by 16 - is it divisible by 4? I once - in a completely different forest (not even a different part of the same forest) was given a test in law for which all the answers were "trivially impossible" and which I, and most of the class, failed. Questions to make you think and understand, Great teaching. Embarrassed students, who would never make the same mistake again. – Mark Bennet May 21 '15 at 21:10
  • 1
    @MarkBennet Well, when I'll believe in some infinity then I'll be able, perhaps, to respond you. In the meantime I accept infinity as a definite point in some contexts (compactification, elliptic curves with projective geometry, etc.) , very different from usual numbers and thus with no parallel notion of "divisibility". – Timbuc May 21 '15 at 21:37
  • @Timbuc Glorious answer. – Mark Bennet May 21 '15 at 22:00

1 Answers1

4

$250$ numbers are divisible by $4$. Now use inclusion/exclusion principle:

$$250-\left\lfloor\frac{250}{3}\right\rfloor-\left\lfloor\frac{250}{4}\right\rfloor+\left\lfloor\frac{250}{3\times4}\right\rfloor=125$$

Please note that we use $4$ instead of $16$, because those $250$ numbers are not consecutive - they already contain only multiples of $4$, so we need to exclude only those that are multiples of yet "another $4$" (the credit for this fix goes to @AndréNicolas, as implied in the comment below).

barak manos
  • 43,109