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

  • MHB
  • Thread starter anemone
  • Start date
In summary, "Solve K+S(k)" is a mathematical equation representing the solution to a problem with a constant "K" and a function "S(k)". To solve this equation, one must use basic mathematical principles and substitute a value for "k". The purpose of solving K+S(k) is to find the value of the expression for a given input of "k" and it can be solved using methods such as substitution, factoring, completing the square, or using the quadratic formula. K+S(k) can have multiple solutions depending on the equation and the function "S(k)".
  • #1
anemone
Gold Member
MHB
POTW Director
3,883
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
  • #2
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$
 
  • #3
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...:eek:

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$.
 

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

What does "Solve K+S(k)" mean?

The expression "Solve K+S(k)" is a mathematical equation that represents the solution to a problem where "K" is a constant and "S(k)" is a function that depends on "k". This equation is typically used in algebra or calculus problems.

How do you solve K+S(k)?

To solve K+S(k), you will need to follow basic mathematical principles such as the order of operations and algebraic manipulation. Start by identifying the constant "K" and the function "S(k)". Then, substitute a value for "k" and use the appropriate operations to solve for the result.

What is the purpose of solving K+S(k)?

The purpose of solving K+S(k) is to find the value of the expression for a given input value of "k". This can help in understanding relationships between variables and in solving real-life problems that involve mathematical equations.

What are some common methods used to solve K+S(k)?

The most common methods used to solve K+S(k) include substitution, factoring, completing the square, and using the quadratic formula. The method used will depend on the specific equation and the level of complexity.

Can K+S(k) have multiple solutions?

Yes, K+S(k) can have multiple solutions. This may occur when the equation has multiple terms or when the function "S(k)" has multiple roots. It is important to carefully consider the given problem and any restrictions on the variables to determine the appropriate number of solutions for K+S(k).

Similar threads

Back
Top