System of linear equation based on Sum of the Digits of a number

57 Views Asked by At

My friend gave me this problem which I have not been able to solve:

Let $S(k)$ denote the sum of the digits of $k$. Find all natural solutions $(x,y,z)$ to the equations:

$S(x) + S(y) + S(z) = y-4$

$S(x) + S(y) = x$

$x + y + S(z) = z$

Any help in solving this(I would like to have some hints)?

Edit: Solutions are ok too please.

3

There are 3 best solutions below

4
On BEST ANSWER

Note that $x=S(x) \mod 9$ etc.

So $x$ and $y$ are multiples of 9, and $z = 5 \mod 9$.

If $y = 9$ then $y=S(y)$ and the first equation would give $S(x) + S(z) = -4$ which is impossible. So $y \ge 18$.

If $x = 9$ then $x=S(X)$ and the second equation would give $S(y)=0$ which is impossible. So $x \ge 18$.

And $z > x+y$. So $x \in \{18,27,36 \dots\}$, $y \in \{18, 27, 36 \dots \}$, $z \in \{41, 50, 59, \dots \}$.

I'll let you take it from there.

6
On

For each equation, pick some rather large value of your choice for the only variable that appears twice. What does the equation become?

Edit: Consider equation $1$. We are looking for solutions with, say, $y=1000$. Then we want to find $x,z$ such that $S(x)+S(z)=996-1=995$. So pick $z=1$, $x=1......1$ ($994$ ones) and we get a solution.

Edit 2: you can combine the equations to get a linear relation between $y$ and $z$.

0
On

HINT

To get you started, take the second equation modulo 9 to get $S(y) \equiv 0 \pmod{9}$, so $y = 9k$ for some natural $k$.