discrete math
posted by carlton on .
Find how many positive integers with exactly four decimal digits, that is, positive integers between 1000 and 9999 inclusive, have the following properties:
(a) are divisible by 5 and by 7.
(b) have distinct digits.
(c) are not divisible by either 5 or 7.

(a) div. by 5 and by 7 => div. by 35
We can find out that
35*286=10010 and 35*29=1015
Therefore the number divisible by 35, n35
= 28629=257
(b) distinct digits
First digit has 9 choices (19)
second and subsequent digits 9,8,7 choices each
Numbers with distinct digits
= 9*9*8*7
= 4536
(c) not divisible by either 5 or 7
Divisible by 5, n5= (100001000)/5=1800
Divisisble by 7, n7 = (100031001)/7=1286
Divisible by 5 or 7 or both
=n5+n7n35
=1800+1286257
=2829
Numbers NOT divisible by either 5 or 7
=(100001000)2829
=6171