Take a test Sign in 中文
← Exercise 628 →
Search
Go to
{{searchResults.length}} {{searchResults.length === 1 ? 'result' : 'results'}} for “{{searchWords}}” No results found for “{{searchWords}}” × back to contents
AIME Contents · by chapter
Digits (23)
Primes (14)
Divisors, GCD, and LCM (28)
Divisibility (22)
Fractions, Decimals, and the Floor Function (14)
Bases (19)
Modular Arithmetic (30)
Integer Equations (29)

Exercises and their solutions

Exercise 628
What is the largest positive integer that is not the sum of a positive integral multiple of 30 and a positive composite integer?
← Back to Problem 628
Solution
  1. $n$ fails exactly when every number $n-30j$ with $j\ge1$ and $n-30j\ge1$ is $1$ or prime.
  2. For $n=187$ these are $157,127,97,67,37,7$, all prime, so $187$ fails.
  3. For larger $n$, look at the residue of $n$ mod $30$: in each residue class, a chain of numbers $r,r+30,r+60,\dots$ that are all prime has at most six terms (one of them is divisible by $7$ by the time there are seven), and checking the classes shows that every $n>187$ has a composite $n-30j$.
  4. So the answer is $187$.
  5. The answer is $\boxed{187}$.
Search Go to Prev      Next

Contact Us

Thanks! Your message has been sent.
By year
1996 (1 problems)
1991 (1 problems)