🇺🇸 AMC 8 ⇄ switch contest
1996 AMC 8 Stretch

Problem 13

Problem 13 · AMC 8 Stretch Core
Number Theory Arithmetic & Operations inclusion-exclusionorganizing-data
Find the sum of all whole numbers from 1 to 300 that are divisible by neither 8 nor 6.
Show answer
Answer: 33,748
Show hints
Hint 1 of 4
Start with the sum of ALL numbers from 1 to 300, then subtract the ones you don't want. Remember \(1 + 2 + \cdots + n = \tfrac{n(n+1)}{2}\).
Still stuck? Show hint 2 →
Hint 2 of 4
Subtract the sum of all multiples of 8, and the sum of all multiples of 6. Each is a common factor times a smaller triangular sum.
Still stuck? Show hint 3 →
Hint 3 of 4
Careful: numbers divisible by BOTH 8 and 6 got subtracted twice. Those are multiples of \(\text{lcm}(8,6) = 24\). Add their sum back once.
Show solution
Approach: Inclusion-exclusion on multiples of 8 and 6
  1. All numbers 1 to 300: \(\tfrac{300 \times 301}{2} = 45{,}150\).
  2. Multiples of 8 (\(8 \times 1\) to \(8 \times 37\)): \(8 \times \tfrac{37 \times 38}{2} = 8 \times 703 = 5{,}624\). Multiples of 6 (\(6 \times 1\) to \(6 \times 50\)): \(6 \times \tfrac{50 \times 51}{2} = 6 \times 1275 = 7{,}650\).
  3. Overlap = multiples of \(\text{lcm}(8,6) = 24\) (\(24 \times 1\) to \(24 \times 12\)): \(24 \times \tfrac{12 \times 13}{2} = 24 \times 78 = 1{,}872\). So multiples of 8 OR 6 sum to \(5{,}624 + 7{,}650 - 1{,}872 = 11{,}402\).
  4. Numbers divisible by neither: \(45{,}150 - 11{,}402 = 33{,}748\).
Mark: · log in to save