Take a test Sign in 中文
← Exercise 521 →
Search
Go to
{{searchResults.length}} {{searchResults.length === 1 ? 'result' : 'results'}} for “{{searchWords}}” No results found for “{{searchWords}}” × back to contents
Contents · by chapter
Basic Counting (147)
Balls in Boxes (6)
Probability (142)

Exercises and their solutions

Exercise 521
Call a number \emph{prime-like} if it is composite but not divisible by $2$, $3$, $5$, or $7$. The three smallest prime-like numbers are $121$, $143$, and $169$. There are $168$ prime numbers less than $1000$. How many prime-like numbers are there less than $1000$?
← Back to Problem 521
Solution
  1. Count the integers from $1$ to $999$ divisible by at least one of $2,3,5,7$ by inclusion–exclusion.
  2. Single primes: $499+333+199+142=1173$.
  3. Pairs ($6,10,14,15,21,35$): $166+99+71+66+47+28=477$.
  4. Triples ($30,42,70,105$): $33+23+14+9=79$. All four ($210$): $4$.
  5. So $1173-477+79-4=771$ integers are divisible by at least one of them, and $999-771=228$ are divisible by none.
  6. These $228$ numbers are: the number $1$, the $168-4=164$ primes other than $2,3,5,7$, and the prime-like numbers.
  7. So there are $228-1-164=\boxed{63}$ prime-like numbers.
Search Go to Prev      Next

Contact Us

Thanks! Your message has been sent.
By year