MHB Improving 3 Digit Number Solutions

  • Thread starter Thread starter Ilikebugs
  • Start date Start date
AI Thread Summary
The discussion focuses on improving methods for finding three-digit numbers with a specific digit sum, particularly exploring alternatives to guess and check. A hypothesis is proposed that the digit sum remains unchanged when adding 9 to a number, which is examined through various cases. The conversation concludes that there are 100 three-digit numbers with a digit sum of 5, all of which can be identified in fewer than three steps. Additionally, the concept of digit sums is recognized as significant in number theory and discrete mathematics. The exploration of digit sums presents opportunities for deeper mathematical inquiry.
Ilikebugs
Messages
94
Reaction score
0
View attachment 6241 Is there a better way than guess and check? Also is there a way for a 3 digit number to get to 3 steps, because 999 only goes to 2.
 

Attachments

  • POTW D D.png
    POTW D D.png
    30.2 KB · Views: 112
Mathematics news on Phys.org
Let's denote the "digit sum" function by $\text{D}_{\text{S}}$. After computing this function for the first several natural numbers $n\in\mathbb{N}$ such that $\text{D}_{\text{S}}(n)=5$, I wish to put forth the hypothesis:

$$\text{D}_{\text{S}}(n+9)=\text{D}_{\text{S}}(n)$$.

Let's try to prove this...let's begin by letting $n$ have $m$ digits...thus:

$$n=\sum_{k=0}^{m-1}\left(a_{k}10^{k}\right)$$ where $0\le a_k\le9$ and $0<a_{m-1}$.

We can see that we must have:

$$\text{D}_{\text{S}}(n)=\text{D}_{\text{S}}\left(\sum_{k=0}^{m-1}\left(a_{k}\right)\right)$$

Let's first examine the case where $0<a_0$...what happens to $a_0$ and $a_1$ when we add $9$ to $n$?
 
the digit sum is the same?
 
Ilikebugs said:
the digit sum is the same?

That's the hypothesis we're trying to prove.

What I'm asking is when the one's digit for $n$ is not zero, what happens to the one's digit and the ten's digit when we add 9 to $n$?
 
The ones digit is subtracted by 1 and the tens digit is added by 1
 
Ilikebugs said:
The ones digit is subtracted by 1 and the tens digit is added by 1

Correct! :D

So this leave the digit sum unchanged. What about if $n$ ends in one or more zeroes? What can we do then? (Thinking)
 
MarkFL said:
Correct! :D

So this leave the digit sum unchanged. What about if $n$ ends in one or more zeroes? What can we do then? (Thinking)

Hint: The commutative property of addition...(Thinking)
 
Okay, let's assume the lemma I gave is true, and so all numbers having at least 3 digits and whose digit sum is 5 is given by:

$n=95+9m$ where $m\in\mathbb{N}$

We find the largest 3 digit number whose digit sum is 5 to be 995. So we set:

$n=95+9m=995$

$$9m=900$$

$$m=100$$

Thus, there are 100 such numbers for which the question called. And you are correct that all can be found in less than 3 steps.
 
Alternatively, observe that the digit sum for consecutive numbers increases by 1 as we add 1, "rolling over" to 1 as we increase by one from a digit sum of 9. Since 999 - 99 = 900 and 900/9 = 100, there are 100 numbers in the given range with a digit sum of 5.
 
  • #10
greg1313 said:
Alternatively, observe that the digit sum for consecutive numbers increases by 1 as we add 1, "rolling over" to 1 as we increase by one from a digit sum of 9. Since 999 - 99 = 900 and 900/9 = 100, there are 100 numbers in the given range with a digit sum of 5.

Greg, I'm just curious, had you ever heard of "digit sums" before this thread? I hadn't. It seems a topic for a rich exploration. :D
 
  • #11
MarkFL said:
Greg, I'm just curious, had you ever heard of "digit sums" before this thread? I hadn't. It seems a topic for a rich exploration. :D

Yes. Actually they appear in number theory and discrete mathematics (at least). I once used digit sums to solve a problem that involved finding the missing digits in a sum. I don't recall the exact problem; it was quite some time ago. :)
 

Similar threads

Back
Top