Proof for sum of digits of a number until sum is a single number
$begingroup$
Here is a more elaborate description of the problem statement. What I found with a few examples is that given a number, say 569. If we are required to sum its digits repetitively until the sum is single digit, i.e
1)5+6+9 = 20;
2)2+0 = 2
where 2 is single digit sum
We can compute the result, 2, with just one run through the number as follows:
1) 5+6 = 11 // adding first 2 digits of 569
2) 1+1 = 2 // adding the sum of 5,6 since its more than 1 digit
3) 2 + 9 = 11 // adding the sum of digits of 11 to 9, the last digit of 569
4) 1 + 1 = 2 // summing the digits of result of step 3
which yields the same result, 2.
Could someone prove mathematically(or otherwise) why this works?
OR
provide an example where it won't work? I'm pretty sure it works all the time but don't have a proof..
Edit 1:
@Mark Bennet. Thanks for your answer. I was able to fill in the gaps and understand why the answer can be derived directly from the initial positive number using modulo 9. I will write out the proof after telling what I didn't understand.
Let original number be n.
I understood that the answer would be x = n%9 if x > 0 and 9 if x = 0;
However, what I didn't understand is, why when going by the less efficient way of repetitively summing the digits of the numbers, the order of adding the digits does not matter.
Proof of what I got from your explanation:
Let n be original number, s1, s2, s3, ..., sk be the sums formed by adding the digits. Let sk be single digit.
We know what n-s1, s1-s2, s2-s3 are all divisible by 9 because of your explanation. So we can add them all up, cancelling s1,s2, ..., sk-1j, until we are left with just n-sk which is also divisible by 9.
So, we can write n = 9p+sk where p >=0. By definition, sk is n%9.
What I didn't understand, (or rather connect this proof to) what my question is initially seeking an answer for: If I still went by my way of adding digits repetitively, why does the order of adding digits not matter?
proof-verification summation
$endgroup$
add a comment |
$begingroup$
Here is a more elaborate description of the problem statement. What I found with a few examples is that given a number, say 569. If we are required to sum its digits repetitively until the sum is single digit, i.e
1)5+6+9 = 20;
2)2+0 = 2
where 2 is single digit sum
We can compute the result, 2, with just one run through the number as follows:
1) 5+6 = 11 // adding first 2 digits of 569
2) 1+1 = 2 // adding the sum of 5,6 since its more than 1 digit
3) 2 + 9 = 11 // adding the sum of digits of 11 to 9, the last digit of 569
4) 1 + 1 = 2 // summing the digits of result of step 3
which yields the same result, 2.
Could someone prove mathematically(or otherwise) why this works?
OR
provide an example where it won't work? I'm pretty sure it works all the time but don't have a proof..
Edit 1:
@Mark Bennet. Thanks for your answer. I was able to fill in the gaps and understand why the answer can be derived directly from the initial positive number using modulo 9. I will write out the proof after telling what I didn't understand.
Let original number be n.
I understood that the answer would be x = n%9 if x > 0 and 9 if x = 0;
However, what I didn't understand is, why when going by the less efficient way of repetitively summing the digits of the numbers, the order of adding the digits does not matter.
Proof of what I got from your explanation:
Let n be original number, s1, s2, s3, ..., sk be the sums formed by adding the digits. Let sk be single digit.
We know what n-s1, s1-s2, s2-s3 are all divisible by 9 because of your explanation. So we can add them all up, cancelling s1,s2, ..., sk-1j, until we are left with just n-sk which is also divisible by 9.
So, we can write n = 9p+sk where p >=0. By definition, sk is n%9.
What I didn't understand, (or rather connect this proof to) what my question is initially seeking an answer for: If I still went by my way of adding digits repetitively, why does the order of adding digits not matter?
proof-verification summation
$endgroup$
$begingroup$
So you're asking if, and in that case why, one can calculate the digit sum in any order?
$endgroup$
– Arthur
Dec 9 '18 at 8:25
$begingroup$
I tried doing that as well and it seemed to work. You can try it too
$endgroup$
– user3760100
Dec 9 '18 at 14:33
add a comment |
$begingroup$
Here is a more elaborate description of the problem statement. What I found with a few examples is that given a number, say 569. If we are required to sum its digits repetitively until the sum is single digit, i.e
1)5+6+9 = 20;
2)2+0 = 2
where 2 is single digit sum
We can compute the result, 2, with just one run through the number as follows:
1) 5+6 = 11 // adding first 2 digits of 569
2) 1+1 = 2 // adding the sum of 5,6 since its more than 1 digit
3) 2 + 9 = 11 // adding the sum of digits of 11 to 9, the last digit of 569
4) 1 + 1 = 2 // summing the digits of result of step 3
which yields the same result, 2.
Could someone prove mathematically(or otherwise) why this works?
OR
provide an example where it won't work? I'm pretty sure it works all the time but don't have a proof..
Edit 1:
@Mark Bennet. Thanks for your answer. I was able to fill in the gaps and understand why the answer can be derived directly from the initial positive number using modulo 9. I will write out the proof after telling what I didn't understand.
Let original number be n.
I understood that the answer would be x = n%9 if x > 0 and 9 if x = 0;
However, what I didn't understand is, why when going by the less efficient way of repetitively summing the digits of the numbers, the order of adding the digits does not matter.
Proof of what I got from your explanation:
Let n be original number, s1, s2, s3, ..., sk be the sums formed by adding the digits. Let sk be single digit.
We know what n-s1, s1-s2, s2-s3 are all divisible by 9 because of your explanation. So we can add them all up, cancelling s1,s2, ..., sk-1j, until we are left with just n-sk which is also divisible by 9.
So, we can write n = 9p+sk where p >=0. By definition, sk is n%9.
What I didn't understand, (or rather connect this proof to) what my question is initially seeking an answer for: If I still went by my way of adding digits repetitively, why does the order of adding digits not matter?
proof-verification summation
$endgroup$
Here is a more elaborate description of the problem statement. What I found with a few examples is that given a number, say 569. If we are required to sum its digits repetitively until the sum is single digit, i.e
1)5+6+9 = 20;
2)2+0 = 2
where 2 is single digit sum
We can compute the result, 2, with just one run through the number as follows:
1) 5+6 = 11 // adding first 2 digits of 569
2) 1+1 = 2 // adding the sum of 5,6 since its more than 1 digit
3) 2 + 9 = 11 // adding the sum of digits of 11 to 9, the last digit of 569
4) 1 + 1 = 2 // summing the digits of result of step 3
which yields the same result, 2.
Could someone prove mathematically(or otherwise) why this works?
OR
provide an example where it won't work? I'm pretty sure it works all the time but don't have a proof..
Edit 1:
@Mark Bennet. Thanks for your answer. I was able to fill in the gaps and understand why the answer can be derived directly from the initial positive number using modulo 9. I will write out the proof after telling what I didn't understand.
Let original number be n.
I understood that the answer would be x = n%9 if x > 0 and 9 if x = 0;
However, what I didn't understand is, why when going by the less efficient way of repetitively summing the digits of the numbers, the order of adding the digits does not matter.
Proof of what I got from your explanation:
Let n be original number, s1, s2, s3, ..., sk be the sums formed by adding the digits. Let sk be single digit.
We know what n-s1, s1-s2, s2-s3 are all divisible by 9 because of your explanation. So we can add them all up, cancelling s1,s2, ..., sk-1j, until we are left with just n-sk which is also divisible by 9.
So, we can write n = 9p+sk where p >=0. By definition, sk is n%9.
What I didn't understand, (or rather connect this proof to) what my question is initially seeking an answer for: If I still went by my way of adding digits repetitively, why does the order of adding digits not matter?
proof-verification summation
proof-verification summation
edited Dec 9 '18 at 15:19
user3760100
asked Dec 9 '18 at 7:53
user3760100user3760100
122115
122115
$begingroup$
So you're asking if, and in that case why, one can calculate the digit sum in any order?
$endgroup$
– Arthur
Dec 9 '18 at 8:25
$begingroup$
I tried doing that as well and it seemed to work. You can try it too
$endgroup$
– user3760100
Dec 9 '18 at 14:33
add a comment |
$begingroup$
So you're asking if, and in that case why, one can calculate the digit sum in any order?
$endgroup$
– Arthur
Dec 9 '18 at 8:25
$begingroup$
I tried doing that as well and it seemed to work. You can try it too
$endgroup$
– user3760100
Dec 9 '18 at 14:33
$begingroup$
So you're asking if, and in that case why, one can calculate the digit sum in any order?
$endgroup$
– Arthur
Dec 9 '18 at 8:25
$begingroup$
So you're asking if, and in that case why, one can calculate the digit sum in any order?
$endgroup$
– Arthur
Dec 9 '18 at 8:25
$begingroup$
I tried doing that as well and it seemed to work. You can try it too
$endgroup$
– user3760100
Dec 9 '18 at 14:33
$begingroup$
I tried doing that as well and it seemed to work. You can try it too
$endgroup$
– user3760100
Dec 9 '18 at 14:33
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
Think about just one digit. In the original number it appears as $atimes10^r$ because of its "place value". In the sum of digits it appears just as $a$.
The difference between the two is $atimes (10^r-1)$, and you will see that $10^r-1$ has every digit $9$ (or is zero if $r=0$) and is therefore divisible by $9$.
The difference between the original number and its sum of digits is therefore divisible by $9$, and this can be used to show that when you start with a positive integer the single digit you get at the end is $9$ if the number is divisible by $9$ or is otherwise the remainder you get when you divide the original number by $9$.
It doesn't matter how this sum is calculated - beginning with a single digit shows that this can be done digit by digit. The difference at every stage between the number you started with and the one you finish with is divisible by $9$. That is the key point.
I have left some gaps for you to fill in. There are plenty of slick proofs out there ("casting out nines" is an old name for this, which was a check on arithmetic in the days before electronic calculators), but you will do best to work it through for yourself.
$endgroup$
$begingroup$
can you please help me out with the part I still didn't get. I've edited my answer to describe what I understood
$endgroup$
– user3760100
Dec 9 '18 at 15:20
$begingroup$
@user3760100 I think that the root is that addition is commutative (so the order of addition for integers doesn't matter) and the reduction from integers to integers modulo $9$ - so that numbers which differ by a multiple of $9$ count as the same - is a homomorphism of rings, so respects the original addition, and therefore is also unaffected by any changes in the order of doing things. You've probably got the associative property in there as well. In other words it is down to very basic properties of integers which we tend to take for granted and only notice when they surprise us.
$endgroup$
– Mark Bennet
Dec 9 '18 at 18:26
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3032131%2fproof-for-sum-of-digits-of-a-number-until-sum-is-a-single-number%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
Think about just one digit. In the original number it appears as $atimes10^r$ because of its "place value". In the sum of digits it appears just as $a$.
The difference between the two is $atimes (10^r-1)$, and you will see that $10^r-1$ has every digit $9$ (or is zero if $r=0$) and is therefore divisible by $9$.
The difference between the original number and its sum of digits is therefore divisible by $9$, and this can be used to show that when you start with a positive integer the single digit you get at the end is $9$ if the number is divisible by $9$ or is otherwise the remainder you get when you divide the original number by $9$.
It doesn't matter how this sum is calculated - beginning with a single digit shows that this can be done digit by digit. The difference at every stage between the number you started with and the one you finish with is divisible by $9$. That is the key point.
I have left some gaps for you to fill in. There are plenty of slick proofs out there ("casting out nines" is an old name for this, which was a check on arithmetic in the days before electronic calculators), but you will do best to work it through for yourself.
$endgroup$
$begingroup$
can you please help me out with the part I still didn't get. I've edited my answer to describe what I understood
$endgroup$
– user3760100
Dec 9 '18 at 15:20
$begingroup$
@user3760100 I think that the root is that addition is commutative (so the order of addition for integers doesn't matter) and the reduction from integers to integers modulo $9$ - so that numbers which differ by a multiple of $9$ count as the same - is a homomorphism of rings, so respects the original addition, and therefore is also unaffected by any changes in the order of doing things. You've probably got the associative property in there as well. In other words it is down to very basic properties of integers which we tend to take for granted and only notice when they surprise us.
$endgroup$
– Mark Bennet
Dec 9 '18 at 18:26
add a comment |
$begingroup$
Think about just one digit. In the original number it appears as $atimes10^r$ because of its "place value". In the sum of digits it appears just as $a$.
The difference between the two is $atimes (10^r-1)$, and you will see that $10^r-1$ has every digit $9$ (or is zero if $r=0$) and is therefore divisible by $9$.
The difference between the original number and its sum of digits is therefore divisible by $9$, and this can be used to show that when you start with a positive integer the single digit you get at the end is $9$ if the number is divisible by $9$ or is otherwise the remainder you get when you divide the original number by $9$.
It doesn't matter how this sum is calculated - beginning with a single digit shows that this can be done digit by digit. The difference at every stage between the number you started with and the one you finish with is divisible by $9$. That is the key point.
I have left some gaps for you to fill in. There are plenty of slick proofs out there ("casting out nines" is an old name for this, which was a check on arithmetic in the days before electronic calculators), but you will do best to work it through for yourself.
$endgroup$
$begingroup$
can you please help me out with the part I still didn't get. I've edited my answer to describe what I understood
$endgroup$
– user3760100
Dec 9 '18 at 15:20
$begingroup$
@user3760100 I think that the root is that addition is commutative (so the order of addition for integers doesn't matter) and the reduction from integers to integers modulo $9$ - so that numbers which differ by a multiple of $9$ count as the same - is a homomorphism of rings, so respects the original addition, and therefore is also unaffected by any changes in the order of doing things. You've probably got the associative property in there as well. In other words it is down to very basic properties of integers which we tend to take for granted and only notice when they surprise us.
$endgroup$
– Mark Bennet
Dec 9 '18 at 18:26
add a comment |
$begingroup$
Think about just one digit. In the original number it appears as $atimes10^r$ because of its "place value". In the sum of digits it appears just as $a$.
The difference between the two is $atimes (10^r-1)$, and you will see that $10^r-1$ has every digit $9$ (or is zero if $r=0$) and is therefore divisible by $9$.
The difference between the original number and its sum of digits is therefore divisible by $9$, and this can be used to show that when you start with a positive integer the single digit you get at the end is $9$ if the number is divisible by $9$ or is otherwise the remainder you get when you divide the original number by $9$.
It doesn't matter how this sum is calculated - beginning with a single digit shows that this can be done digit by digit. The difference at every stage between the number you started with and the one you finish with is divisible by $9$. That is the key point.
I have left some gaps for you to fill in. There are plenty of slick proofs out there ("casting out nines" is an old name for this, which was a check on arithmetic in the days before electronic calculators), but you will do best to work it through for yourself.
$endgroup$
Think about just one digit. In the original number it appears as $atimes10^r$ because of its "place value". In the sum of digits it appears just as $a$.
The difference between the two is $atimes (10^r-1)$, and you will see that $10^r-1$ has every digit $9$ (or is zero if $r=0$) and is therefore divisible by $9$.
The difference between the original number and its sum of digits is therefore divisible by $9$, and this can be used to show that when you start with a positive integer the single digit you get at the end is $9$ if the number is divisible by $9$ or is otherwise the remainder you get when you divide the original number by $9$.
It doesn't matter how this sum is calculated - beginning with a single digit shows that this can be done digit by digit. The difference at every stage between the number you started with and the one you finish with is divisible by $9$. That is the key point.
I have left some gaps for you to fill in. There are plenty of slick proofs out there ("casting out nines" is an old name for this, which was a check on arithmetic in the days before electronic calculators), but you will do best to work it through for yourself.
answered Dec 9 '18 at 8:37
Mark BennetMark Bennet
81.6k984181
81.6k984181
$begingroup$
can you please help me out with the part I still didn't get. I've edited my answer to describe what I understood
$endgroup$
– user3760100
Dec 9 '18 at 15:20
$begingroup$
@user3760100 I think that the root is that addition is commutative (so the order of addition for integers doesn't matter) and the reduction from integers to integers modulo $9$ - so that numbers which differ by a multiple of $9$ count as the same - is a homomorphism of rings, so respects the original addition, and therefore is also unaffected by any changes in the order of doing things. You've probably got the associative property in there as well. In other words it is down to very basic properties of integers which we tend to take for granted and only notice when they surprise us.
$endgroup$
– Mark Bennet
Dec 9 '18 at 18:26
add a comment |
$begingroup$
can you please help me out with the part I still didn't get. I've edited my answer to describe what I understood
$endgroup$
– user3760100
Dec 9 '18 at 15:20
$begingroup$
@user3760100 I think that the root is that addition is commutative (so the order of addition for integers doesn't matter) and the reduction from integers to integers modulo $9$ - so that numbers which differ by a multiple of $9$ count as the same - is a homomorphism of rings, so respects the original addition, and therefore is also unaffected by any changes in the order of doing things. You've probably got the associative property in there as well. In other words it is down to very basic properties of integers which we tend to take for granted and only notice when they surprise us.
$endgroup$
– Mark Bennet
Dec 9 '18 at 18:26
$begingroup$
can you please help me out with the part I still didn't get. I've edited my answer to describe what I understood
$endgroup$
– user3760100
Dec 9 '18 at 15:20
$begingroup$
can you please help me out with the part I still didn't get. I've edited my answer to describe what I understood
$endgroup$
– user3760100
Dec 9 '18 at 15:20
$begingroup$
@user3760100 I think that the root is that addition is commutative (so the order of addition for integers doesn't matter) and the reduction from integers to integers modulo $9$ - so that numbers which differ by a multiple of $9$ count as the same - is a homomorphism of rings, so respects the original addition, and therefore is also unaffected by any changes in the order of doing things. You've probably got the associative property in there as well. In other words it is down to very basic properties of integers which we tend to take for granted and only notice when they surprise us.
$endgroup$
– Mark Bennet
Dec 9 '18 at 18:26
$begingroup$
@user3760100 I think that the root is that addition is commutative (so the order of addition for integers doesn't matter) and the reduction from integers to integers modulo $9$ - so that numbers which differ by a multiple of $9$ count as the same - is a homomorphism of rings, so respects the original addition, and therefore is also unaffected by any changes in the order of doing things. You've probably got the associative property in there as well. In other words it is down to very basic properties of integers which we tend to take for granted and only notice when they surprise us.
$endgroup$
– Mark Bennet
Dec 9 '18 at 18:26
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3032131%2fproof-for-sum-of-digits-of-a-number-until-sum-is-a-single-number%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
$begingroup$
So you're asking if, and in that case why, one can calculate the digit sum in any order?
$endgroup$
– Arthur
Dec 9 '18 at 8:25
$begingroup$
I tried doing that as well and it seemed to work. You can try it too
$endgroup$
– user3760100
Dec 9 '18 at 14:33