Take a test Sign in 中文
← Exercise 560 →
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 560
Given a positive integer $n$, let $p(n)$ be the product of the non-zero digits of $n$. (If $n$ has only one digit, then $p(n)$ is equal to that digit.) Let \[ S=p(1)+p(2)+p(3)+\cdots+p(9999) \] What is the largest prime factor of $S$?
← Back to Problem 560
Solution
  1. Write each number as four digits (leading zeros allowed) and replace each $0$ by $1$ in the product.
  2. Then $\sum_{n=0}^{9999}p(n)=(1+1+2+\cdots+9)^4=46^4$, where $n=0$ contributes $1$.
  3. So $S=46^4-1=(46-1)(46+1)(46^2+1)=45\cdot47\cdot2117=3^2\cdot5\cdot47\cdot29\cdot73$.
  4. The largest prime factor is $73$.
  5. The answer is $\boxed{073}$.
Search Go to Prev      Next

Contact Us

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