• S
    SwaseekhGATE Preparation
General
  • Dashboard
  • Syllabus
  • Questions
  • Aptitude
  • Mock Tests
  • TCS NQT 2026
Account
  • Pricing
  • Contact
  1. GATE CS
  2. PYQs
  3. Discrete Mathematics

The number of integers between 1 and 500 (both inclusive) that are divisible by 3 or 5 or 7 is _______.

GATE 2017 · Discrete Mathematics · Set Theory · medium

Answer: 271

  1. Individual counts: |A_3| = floor(500/3) = 166; |A_5| = floor(500/5) = 100; |A_7| = floor(500/7) = 71. Sum = 166 + 100 + 71 = 337.
  2. Pairwise intersection counts: |A_15| = floor(500/15) = 33; |A_21| = floor(500/21) = 23; |A_35| = floor(500/35) = 14. Sum of pairwise = 33 + 23 + 14 = 70.
  3. Triple intersection and inclusion-exclusion: |A_105| = floor(500/105) = 4. Result = 337 - 70 + 4 = 271.