Inclusion-Exclusion Principle: an Example

I picked this example from the MAA MiniuteMath site.

Call a number "prime-looking" if it is composite but not divisibly by 2, 3, or 5. The three smallest prime-looking numbers are 49, 77, and 91. There are 168 prime numbers less than 1000. How many prime-looking numbers are there less than 1000?

Solution

|Contact| |Front page| |Contents| |Algebra| |Store|

Copyright © 1996-2012 Alexander Bogomolny

Call a number "prime-looking" if it is composite but not divisibly by 2, 3, or 5. The three smallest prime-looking numbers are 49, 77, and 91. There are 168 prime numbers less than 1000. How many prime-looking numbers are there less than 1000?

For any positive integers N and m, the number of integers divisible by m which are less than N is given by [(N-1)/m], where the brackets designed the floor function. For example, the number of multiples of three below 20 is [19/3] = 6; these are 3, 6, 9, 12, 15, 18.

Turning to the problem, below 1000 there are

499 = [999/2] numbers divisible by 2,
333 = [999/3] numbers divisible by 3,
199 = [999/5] numbers divisible by 5,
166 = [999/6] numbers divisible by 6 = 2·3,
99 = [999/10] numbers divisible by 10 = 2·5,
66 = [999/15] numbers divisible by 15 = 3·5, and
33 = [999/30] numbers divisible by 30 = 2·3·.

According to the Inclusion-Exclusion Principle, the amount of integers below 1000 that could not be prime-looking is

499 + 333 + 199 - 166 - 99 - 66 + 33 = 733.

There are 733 numbers divisible by at least one of 2, 3, 5. Note that this count includes (prime) 2, 3, and 5.

Waht can be said of the remaining 999 - 733 = 266 numbers? These are the numbers that are not divisible by either 2, 3, or 5. Are these prime-looking? No, not all of them. Some are really prime, not just appearing so. As was stated in the problem, there are 168 are primes below 1000. We have to exclude those. But number 2, 3, 5 have been discounted before, which leaves us with 165 primes extras. Subtracting gives 266 - 165 = 101.

Now, a final observation. Number 1 is not divisible by any greater number, 2, 3, 5 in particular. Thus it was not counted among the 733 composite numbers above. So, it is counted among the remaining 266 and, not being a prime, among the last group of 101 numbers. These are the numbers that are not divisible by either 2, 3, or 5, which trivially includes 1. But 1 is not composite and thus is not prime-looking. To get the total of prime-looking numbers we have to remove 1 from the count, leaving 101 - 1 = 100.

References

  1. V. K. Balakrishnan, Theory and Probl ems of Combinatorics, Schaum's Outline Series, McGraw-Hill, 1995

Related material
Read more...

  • The Basic Rules of Counting
  • Combinatorial Proofs
  • Fibonacci Tilings
  • The Inclusion-Exclusion Principle
  • Ramsey's Theorem
  • Coloring Points in the Plane
  • Probabilities
  • Example: A Poker Hand
  • |Contact| |Front page| |Contents| |Algebra| |Store|

    Copyright © 1996-2012 Alexander Bogomolny

     41162537

    A math books store at a unique math study site. Shopping at the store helps maintain the site. Thank you.
    Sites for teachers
    Sites for parents
    Terms of use
    Awards
    Interactive Activities

    CTK Exchange
    CTK Wiki Math
    CTK Insights - a blog
    Math Help
    Games & Puzzles
    What Is What
    Arithmetic
    Algebra
    Geometry
    Probability
    Outline Mathematics
    Make an Identity
    Book Reviews
    Stories for Young
    Eye Opener
    Analog Gadgets
    Inventor's Paradox
    Did you know?...
    Proofs
    Math as Language
    Things Impossible
    Visual Illusions
    My Logo
    Math Poll
    Cut The Knot!
    MSET99 Talk
    Old and nice bookstore
    Other Math sites
    Front Page
    Movie shortcuts
    Personal info
    Privacy Policy

    Guest book
    News sites

    Recommend this site

    Sites for parents

    Education & Parenting

    Search:
    Keywords:

    Google
    Web CTK
    Supported by
    3wVentures