MHB Can $k+S(k)=1,000,000$ have a solution?

  • Thread starter Thread starter anemone
  • Start date Start date
Click For Summary
The equation k + S(k) = 1,000,000 has no solution for any positive integer k, as demonstrated through analysis of the properties of digit sums. The maximum value of S(k) for k less than 1,000,000 is limited, making it impossible for the equation to hold true. In contrast, the equation k + S(k) = 1,000,000,000 can be solved, and further exploration of this solution will be shared for educational purposes. The discussion emphasizes the importance of understanding digit sums in relation to large numbers. Overall, the challenge highlights intriguing mathematical properties and encourages collaborative problem-solving.
anemone
Gold Member
MHB
POTW Director
Messages
3,851
Reaction score
115
For any positive integer $k$, let $S(k)$ denote the sum of its digits. Show that the equation $k+S(k)=1,000,000$ has no solution.

Then, solve the equation $k+S(k)=1,000,000,000$.
 
Mathematics news on Phys.org
We want to solve the equation $k + S(k) = 10^n$ for some natural number $n \in \mathbb{N}$. First observe that:

  • if $k$ has more than $n$ significant digits, then $k \geq 10^n$ and $S(k) \geq 1$ so $k + S(k) \geq 10^n + 1$ hence $k + S(k) \ne 10^n$.
  • if $k$ has less than $n$ significant digits, then $k < 10^{n - 1}$ and $S(k) \leq 9(n - 1)$ so $k + S(k) < 10^{n - 1} + 9(n - 1) < 10^n$.

Therefore if $k$ is a solution then $k$ has exactly $n$ significant digits. Therefore write:
$$k = s_{n - 1} \cdot 10^{n - 1} + s_{n - 2} \cdot 10^{n - 2} + \cdots + s_1 \cdot 10 + s_0 = \sum_{i = 0}^{n - 1} s_i \cdot 10^i$$
For $0 \leq s_0, s_1, \cdots, s_{n - 1} \leq 9$, and also notice that:
$$10^n = 9 \cdot 10^{n - 1} + 9 \cdot 10^{n - 2} + \cdots + 9 \cdot 10 + 9 + 1 = 1 + \sum_{i = 0}^{n - 1} 9 \cdot 10^i$$
Therefore we must have:
$$S(k) = 10^n - k = 1 + \left [ \sum_{i = 0}^{n - 1} 9 \cdot 10^i \right ] - \left [ \sum_{i = 0}^{n - 1} s_i \cdot 10^i \right ] = 1 + \sum_{i = 0}^{n - 1} \left ( 9 \cdot 10^i - s_i \cdot 10^i \right ) = 1 + \sum_{i = 0}^{n - 1} \left ( 9 - s_i \right ) \cdot 10^i$$
And since $S(k)$ is just the sum of the digits $s_0, s_1, \cdots, s_{n - 1}$ this simplifies to:
$$\sum_{i = 0}^{n - 1} s_i = 1 + \sum_{i = 0}^{n - 1} \left ( 9 - s_i \right ) \cdot 10^i$$
Now suppose that $n = 6$ as in the first part of the problem. Then we know that $S(k) \leq 6 \cdot 9 < 100$, and so it's clear that all $s_i$'s but the least two significant $s_1$ and $s_0$ must be equal to $9$ since otherwise the sum contains a term greater than $10^2$ and so the equality cannot hold. Therefore we have $s_5 = s_4 = s_3 = s_2 = 9$ and therefore the equation becomes:
$$9 \cdot 4 + s_1 + s_0 = 1 + 10(9 - s_1) + (9 - s_0) ~ ~ ~ \iff ~ ~ ~ 11 s_1 + 2 s_0 = 64 ~ ~ ~ \iff ~ ~ ~ s_0 = 32 - \frac{11}{2} s_1$$
So $s_1$ has to be even, and enumerating all possible values $s_1 = 2, 4, 6, 8$ shows that the equation above admits no integer solutions in $(s_0, s_1)$. Therefore are no solutions to the problem for $n = 6$ and so $k + S(k) = 10^6$ has no solutions.

Now suppose that $n = 9$ as in the second part of the problem. We have $S(k) \leq 9 \cdot 9 < 100$ so it still holds that all but the least two significant digits are equal to $9$, and so the equation in this case is:
$$9 \cdot 7 + s_1 + s_0 = 1 + 10(9 - s_1) + (9 - s_0) ~ ~ ~ \iff ~ ~ ~ 11 s_1 + 2 s_0 = 37 ~ ~ ~ \iff ~ ~ ~ s_0 = \frac{37 - 11 s_1}{2}$$
And we see that $s_1$ has to be odd, and checking all possible values $s_1 = 1, 3, 5, 7, 9$ we find the unique solution $(s_0, s_1) = (2, 3)$, giving the unique solution to the problem for $n = 9$ given by $s_8 = s_7 = s_6 = s_5 = s_4 = s_3 = s_2 = 9$, $s_1 = 3$, $s_0 = 2$, that is, $k = 999999932$. And indeed:
$$999999932 + S(999999932) = 999999932 + 68 = 10^9$$
$\blacksquare$
 
Sorry for the late reply, Bacterius, I was sick yesterday and I am still sick today...

But, I want to thank you for participating in this particular challenge of mine, I will share the other solution too so that we all learn something everyday...:o

First, consider the equation $k+S(k)=1,000,000$. Since $S(k)>0$, we have $k\le 999,999$. Thus, $k$ has at most 6 digits and hence $S(k)\le 6(9)=54$. It follows that $k\ge 1,000,000-54=999946$ and therefore $k=999,900+10a+b$ and $S(k)=36+a+b$ where $a$ and $b$ are integers between 0 and 9 with $a\ge 4$.

The original equation now becomes $k+S(k)=(999,900+10a+b)+(36+a+b)=1,000,000$, simplifying gives $11a+2b=64$. Obviously, $a\le 5$. If $a=5$, then $2b=9$, and if $a=4$, then $2b=20$. In either case, $b$ is not a digit, so the equation has no solution.

We study the equation $k+S(k)=1,000,000,000$ in a similar manner. Here, $k$ has at most 9 digits, so $S(k)\le 9(9)=81$ and $k\ge 999,999,919$. Thus, $k=999,999,900+10a+b$ with $a\ge 1$ and $S(k)=63+a+b$ and we see that $11a+2b=37$. Obviously $a\le 3$ and $a$ is not even. If $a=1$, then $2b=26$ and $b$ is too large. Thus we must have $a=3$ and so $2b=4$ giving $b=2$. In other words, $k=999,999,932$.
 
Here is a little puzzle from the book 100 Geometric Games by Pierre Berloquin. The side of a small square is one meter long and the side of a larger square one and a half meters long. One vertex of the large square is at the center of the small square. The side of the large square cuts two sides of the small square into one- third parts and two-thirds parts. What is the area where the squares overlap?

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K