I Fundamentals, 4. Digits of Numbers
Let us prove the last three properties. Using (1) and the inequality
x
+
y
≥
x
+
y
, we have
S
(
N
1
+
N
2
)
=
N
1
+
N
2
−
9
k
≥
1
%
N
1
+
N
2
10
k
&
≤
N
1
+
N
2
−
9
k
≥
1
%
N
1
10
k
&
+
%
N
2
10
k
&
=
S
(
N
1
)
+
S
(
N
2
).
Because of the symmetry, in order to prove (4) it suffices to prove that
S
(
N
1
N
2
)
≤
N
1
S
(
N
2
)
.
The last inequality follows by applying the subadditivity property repeatedly.
Indeed,
S
(
2
N
2
)
=
S
(
N
2
+
N
2
)
≤
S
(
N
2
)
+
S
(
N
2
)
=
2
S
(
N
2
),
and after
N
1
steps we obtain
S
(
N
1
N
2
)
=
S
(
N
2
+
N
2
+ · · · +
N
2
N
1
times
)
≤
S
(
N
2
)
+
S
(
N
2
)
+ · · · +
S
(
N
2
)
N
1
times
=
N
1
S
(
N
2
).
For (5) observe that if
N
2
=
"
k
o
=
0
b
i
·
10
i
, then
S
(
N
1
N
2
)
=
S
N
1
h
i
=
0
b
i
10
i
=
S
h
i
=
0
N
1
b
i
10
i
≤
h
i
=
0
S
(
N
1
b
i
10
i
)
=
h
i
=
0
S
(
N
1
b
i
)
≤
h
i
=
0
b
i
S
(
N
1
)
=
S
(
N
1
)
S
(
N
2
).
Examples.
(1)
In the decimal expansion of N , the digits occur in increasing order.
What is S
(
9
N
)
?
(1999 Russian Mathematical Olympiad)
Solution.
Write
N
=
a
k
a
k
−
1
· · ·
a
0
. By performing the subtraction
a
k
a
k
−
1
. . .
a
1
a
0
0
−
a
k
. . .
a
2
a
1
a
0
we find that the digits of 9
N
=
10
N
−
N
are
a
k
,
a
k
−
1
−
a
k
, . . . ,
a
1
−
a
2
,
a
0
−
a
1
−
1
,
10
−
a
0
.
These digits sum to 10
−
1
=
9.
4.2. The Sum of the Digits of a Number
81
(2)
Find a positive integer N such that S
(
N
)
=
1996
S
(
3
N
)
.
(1996 Irish Mathematical Olympiad)
Solution.
Consider
N
=
1 33
. . .
3
5986 times
5. Then 3
N
=
4 00
. . .
0
5986 times
5 and
S
(
N
)
=
3
·
5986
+
1
+
5
=
17964
=
1996
·
9
=
1996
S
(
N
).
Problem 4.2.1.
Determine all possible values of the sum of the digits of a perfect
square.
(1995 Iberoamerican Olympiad)
Solution.
The sum of the digits of a number is congruent to the number modulo
9, and so for a perfect square this must be congruent to 0, 1, 4 or 7. We show that
all such numbers occur. The cases
n
=
1 and
n
=
4 are trivial, so assume
n
>
4.
If
n
=
9
m
, then
n
is the sum of the digits of
(
10
m
−
1
)
2
=
10
m
(
10
m
−
2
)
+
1,
which looks like 9
. . .
980
. . .
01. If
n
=
9
m
+
1, consider
(
10
m
−
2
)
2
=
10
m
(
10
m
−
4
)
+
4, which looks like 9
. . .
960
. . .
04. If
n
=
9
m
+
4, consider
(
10
m
−
3
)
2
=
10
m
(
10
m
−
6
)
+
9, which looks like 9
. . .
94
. . .
09. Finally, if
n
=
9
m
−
2, consider
(
10
m
−
5
)
2
=
10
m
(
10
m
−
10
)
+
25, which looks like 9
. . .
900
. . .
025.
Problem 4.2.2.
Find the number of positive
6
-digit integers such that the sum of
their digits is
8
, and four of its digits are
1
,
0
,
0
,
4
.
(2004 Romanian Mathematical Olympiad)
Solution.
The pair of missing digits must be 1, 2 or 0, 3.
In the first case, the first digit can be 1, 2, or 4. When 1 is the first digit, the
remaining digits, 1, 2, 0, 0, 4, can be arranged in 60 ways. When 4 or 2 is the first
digit, the remaining digits can be arranged in 30 ways.
In the same way, when completing with the pair (0
,
3), the first digit can be 1,
3, or 4. In each case, the remaining digits (three zeros and two distinct nonzero
digits) can be arranged in 20 ways.
In conclusion, we have 60
+
2
·
30
+
3
·
20
=
180 numbers that satisfy the
given property.
Problem 4.2.3.
Find the sum of the digits of the numbers from
1
to
1,000,000.
82
I Fundamentals, 4. Digits of Numbers
Solution.
Write the numbers from 0 to 999,999 in a rectangular array as follows:
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
2
. . . . . . . . . . . . . . . . . .
0
0
0
0
0
9
0
0
0
0
1
0
0
0
0
0
1
1
. . . . . . . . . . . . . . . . . .
0
0
0
0
1
9
0
0
0
0
2
0
. . . . . . . . . . . . . . . . . .
9
9
9
9
9
9
There are 1,000,000 six-digit numbers; hence 6,000,000 digits are used. In
each column every digit is equally represented, since in the units column each
digit appears from 0 to 9, in the tens column each digit appears successively in
blocks of 10, and so on. Thus each digit appears 600,000 times, so the required
sum is
600
,
000
·
45
+
1
=
27
,
000
,
001
(do not forget to count 1 from 1,000,000).
Problem 4.2.4.
Find every positive integer n that is equal to the sum of its digits
added to the product of its digits.
Solution.
Let
a
1
a
2
· · ·
a
n
,
a
1
=
0, and
a
2
, . . . ,
a
n
∈ {
0
,
1
, . . . ,
9
}
be a number
such that
a
1
a
2
· · ·
a
n
=
a
1
+
a
2
+ · · · +
a
n
+
a
1
a
2
· · ·
a
n
.
The relation is equivalent to
a
1
(
10
n
−
1
−
1
)
+
a
2
(
10
n
−
2
−
1
)
+ · · · +
9
a
n
−
1
=
a
1
a
2
· · ·
a
n
and
a
2
(
10
n
−
2
−
1
)
+ · · · +
9
a
n
−
1
=
a
1
(
a
2
a
3
· · ·
a
n
−
99
. . .
9
n
−
1 digits
).
The left-hand side of the equality is nonnegative, while the right-hand side is
nonpositive; hence both are equal to zero. The left-hand side is zero if
n
=
0 or
a
2
=
a
3
= · · · =
a
n
−
1
=
0
.
For
a
2
=
a
3
= · · · =
a
n
−
1
=
0, the left-hand side does not equal zero; hence
n
=
2. Then
a
1
(
a
2
−
9
)
=
0, so
a
2
=
0 and
a
1
∈ {
1
,
2
, . . . ,
9
}
. The numbers are
19, 29, 39, 49, 59, 69, 79, 89, 99.
4.2. The Sum of the Digits of a Number
83
Problem 4.2.5.
What is the smallest multiple of
99
whose digits sum to
99
and
that begins and ends with
97
?
(1997 Rio Platense Mathematical Olympiad)
Solution.
We refer to the digits of the number besides the two 97’s as interior
digits; the sum of these digits is 99
−
2
(
9
+
7
)
=
67. Since each digit is at most
9, there are at least eight such digits.
Note that the sum of digits being 99 forces the number to be divisible by 9;
thus it suffices to ensure that the number be divisible by 11, which is to say, the
alternating sum of digits must be divisible by 11.
Suppose the number has exactly eight interior digits. If
a
is the sum of the
odd interior places and
b
the sum of the even places, we have
a
+
b
=
67 and
a
−
b
≡ −
4
(
mod 11
)
. Since
a
−
b
must also be odd, we have
a
−
b
≥
7 or
a
−
b
≤ −
15, and so either
a
≥
37 or
b
≥
41, contradicting the fact that
a
and
b
are each the sum of four digits.
Now suppose the number has nine interior digits. In this case,
a
−
b
≡
0
(
mod 11
)
, so
a
−
b
≥
11 or
a
−
b
≤ −
11. In the latter case,
b
≥
39, again a
contradiction, but in the former case, we have
a
≥
39, which is possible because
a
is now the sum of five digits. To minimize the original number, we take the odd
digits to be 3, 9, 9, 9, 9 and the even digits to be 1, 9, 9, 9, making the minimal
number 9731999999997.
Problem 4.2.6.
Find all positive integers n such that there are nonnegative inte-
gers a and b with
S
(
a
)
=
S
(
b
)
=
S
(
a
+
b
)
=
n
.
(1999 Romanian Selection Test for JBMO)
Solution.
We prove that the required numbers are all multiples of 9.
(a) Let
n
be an integer such that there are positive integers
a
and
b
such that
S
(
a
)
=
S
(
b
)
=
S
(
a
+
b
).
We prove that 9
|
n
.
We have the property
9
|
k
−
S
(
k
).
(
1
)
Using the relation (1) we obtain
9
|
a
−
S
(
a
),
(
2
)
9
|
b
−
S
(
b
),
(
3
)
and
9
|
(
a
+
b
)
−
S
(
a
+
b
).
(
4
)
84
Do'stlaringiz bilan baham: |