Baltic Way 2017 · Problem 19
Number Theory
For an integer let denote the total number of carries which arise when adding 2017 and . The first few values are given by , which can be seen from the following:
| 001 | 001 | 000 |
|---|---|---|
| 2017 | 4034 | 6051 |
| +2017 | +2017 | +2017 |
Prove that
When you’re ready
Review material becomes available with the next Daily.
Review
Topics
Divisibility and factorization
Solutions
Solution 1
Let be the residue of when divided by . There is a carry at the digit representing exactly when . Thus the number of 10-, 100-, 1000- and 10000-carries are, respectively,
and similarly for the rest of the carries. Thus
Solution 2
Let denote the digit sum of . Then we claim the following.
Lemma. We have
where denotes the total number of carries, which arises when adding and .
Proof: We proceed by induction on the maximal number of digits of and .
If both and are single digit numbers then we have just two cases. If , then we have no carries and clearly . If on the other hand , then
Assume that the claim holds for all pair with at most digits each. Let and where og are at most digit numbers. If there is no carry at the th digit, then and thus
If there is a carry then and thus
This finishes the induction and we are done.
Now observe that . We now use (1) a total of times which yields
Thus we arrive at
Contest context
Results from Baltic Way 2017
11 teams
- Mean score
- 2.2 / 5
- Scores of 4 or 5
- 4 / 11
- Estonia
- 0 / 5
Score distribution
All team scores
| Team | Score |
|---|---|
| St. Petersburg | 5 / 5 |
| Germany | 5 / 5 |
| Poland | 3 / 5 |
| Denmark | 4 / 5 |
| Estonia | 0 / 5 |
| Lithuania | 4 / 5 |
| Sweden | 3 / 5 |
| Norway | 0 / 5 |
| Finland | 0 / 5 |
| Iceland | 0 / 5 |
| Latvia | 0 / 5 |