How to check if some number, say a, can be expressed as a = b + reverse(b) ? Where b is some natural...
Is there a reason to prefer HFS+ over APFS for disk images in High Sierra and/or Mojave?
Why does a 97 / 92 key piano exist by Bösendorfer?
Pre-Employment Background Check With Consent For Future Checks
How to leave product feedback on macOS?
ContourPlot — How do I color by contour curvature?
Make a Bowl of Alphabet Soup
When is "ei" a diphthong?
How to preserve electronics (computers, iPads and phones) for hundreds of years
Giving feedback to someone without sounding prejudiced
Would this string work as string?
What should be the ideal length of sentences in a blog post for ease of reading?
How would a solely written language work mechanically
How to make money from a browser who sees 5 seconds into the future of any web page?
How can I safely use "Thalidomide" in my novel while respecting the trademark?
El Dorado Word Puzzle II: Videogame Edition
Review your own paper in Mathematics
What does "tick" mean in this sentence?
Sound waves in different octaves
How do I Interface a PS/2 Keyboard without Modern Techniques?
Personal or impersonal in a technical resume
Has the laser at Magurele, Romania reached a tenth of the Sun's power?
Why the "ls" command is showing the permissions of files in a FAT32 partition?
Unable to disable Microsoft Store in domain environment
Do I have to know the General Relativity theory to understand the concept of inertial frame?
How to check if some number, say a, can be expressed as a = b + reverse(b) ? Where b is some natural number.
In how many ways can a number be expressed as a sum of consecutive numbers?How Many Natural Numbers Can Get Expressed as the Sum of Consecutive Natural Numbers in only One Way?What is the significance of the mirror numbers?Are numbers that are already palindromes Lychrel numbers?How to prove that every natural number not of the form $4^n(8m+7)$ can be written as $x^2 + y^2 + z^2$?Number of ways in which a natural number can be expressed as a sum of natural numbers?Natural number which can be expressed as sum of two perfect squares in two different ways?How to prove Prime numbers can be expressed as $6kpm 1$How do I show that any natural number of this expression is a natural linear combination?Proving every natural number can be expressed as $2^{x} cdot {y}$
$begingroup$
How to check if some number, say $a$, can be expressed as $a = b + mathrm{reverse}(b)$ ? Where $a$ and $b$ are some natural numbers.
Some examples:
$22 = 11 + mathrm{rev}(11) = 11 + 11$;
That is, $22$ can be expressed as sum of "another natural number and its reverse".
$121 = 29 + mathrm{rev}(29) = 29 + 92$;
$9$ can't be expressed as sum of "a number and its reverse".
number-theory elementary-number-theory recreational-mathematics
$endgroup$
add a comment |
$begingroup$
How to check if some number, say $a$, can be expressed as $a = b + mathrm{reverse}(b)$ ? Where $a$ and $b$ are some natural numbers.
Some examples:
$22 = 11 + mathrm{rev}(11) = 11 + 11$;
That is, $22$ can be expressed as sum of "another natural number and its reverse".
$121 = 29 + mathrm{rev}(29) = 29 + 92$;
$9$ can't be expressed as sum of "a number and its reverse".
number-theory elementary-number-theory recreational-mathematics
$endgroup$
$begingroup$
It's also not necessary, if we always assume that the reverse of a number takes its smallest decimal representation. e.g. 8 = 4 + rev(4).
$endgroup$
– ConMan
Mar 12 at 22:50
$begingroup$
@DonThousand Divisibility by $11$ only works if the number of digits in the seed number is even, or if the seed number is divisible by $11$. $123+321=444$.
$endgroup$
– Mark Bennet
Mar 12 at 22:54
$begingroup$
@DonThousand It isn't a necessary condition. $444$ is not divisible by $11$
$endgroup$
– Mark Bennet
Mar 12 at 22:57
$begingroup$
Check all natural numbers $0<b<a$ of which there are only a finite number of them.
$endgroup$
– Somos
Mar 12 at 22:59
1
$begingroup$
Relevant oeis
$endgroup$
– Don Thousand
Mar 12 at 23:02
add a comment |
$begingroup$
How to check if some number, say $a$, can be expressed as $a = b + mathrm{reverse}(b)$ ? Where $a$ and $b$ are some natural numbers.
Some examples:
$22 = 11 + mathrm{rev}(11) = 11 + 11$;
That is, $22$ can be expressed as sum of "another natural number and its reverse".
$121 = 29 + mathrm{rev}(29) = 29 + 92$;
$9$ can't be expressed as sum of "a number and its reverse".
number-theory elementary-number-theory recreational-mathematics
$endgroup$
How to check if some number, say $a$, can be expressed as $a = b + mathrm{reverse}(b)$ ? Where $a$ and $b$ are some natural numbers.
Some examples:
$22 = 11 + mathrm{rev}(11) = 11 + 11$;
That is, $22$ can be expressed as sum of "another natural number and its reverse".
$121 = 29 + mathrm{rev}(29) = 29 + 92$;
$9$ can't be expressed as sum of "a number and its reverse".
number-theory elementary-number-theory recreational-mathematics
number-theory elementary-number-theory recreational-mathematics
edited Mar 13 at 2:01
Brian
758116
758116
asked Mar 12 at 22:42
kapilkapil
112
112
$begingroup$
It's also not necessary, if we always assume that the reverse of a number takes its smallest decimal representation. e.g. 8 = 4 + rev(4).
$endgroup$
– ConMan
Mar 12 at 22:50
$begingroup$
@DonThousand Divisibility by $11$ only works if the number of digits in the seed number is even, or if the seed number is divisible by $11$. $123+321=444$.
$endgroup$
– Mark Bennet
Mar 12 at 22:54
$begingroup$
@DonThousand It isn't a necessary condition. $444$ is not divisible by $11$
$endgroup$
– Mark Bennet
Mar 12 at 22:57
$begingroup$
Check all natural numbers $0<b<a$ of which there are only a finite number of them.
$endgroup$
– Somos
Mar 12 at 22:59
1
$begingroup$
Relevant oeis
$endgroup$
– Don Thousand
Mar 12 at 23:02
add a comment |
$begingroup$
It's also not necessary, if we always assume that the reverse of a number takes its smallest decimal representation. e.g. 8 = 4 + rev(4).
$endgroup$
– ConMan
Mar 12 at 22:50
$begingroup$
@DonThousand Divisibility by $11$ only works if the number of digits in the seed number is even, or if the seed number is divisible by $11$. $123+321=444$.
$endgroup$
– Mark Bennet
Mar 12 at 22:54
$begingroup$
@DonThousand It isn't a necessary condition. $444$ is not divisible by $11$
$endgroup$
– Mark Bennet
Mar 12 at 22:57
$begingroup$
Check all natural numbers $0<b<a$ of which there are only a finite number of them.
$endgroup$
– Somos
Mar 12 at 22:59
1
$begingroup$
Relevant oeis
$endgroup$
– Don Thousand
Mar 12 at 23:02
$begingroup$
It's also not necessary, if we always assume that the reverse of a number takes its smallest decimal representation. e.g. 8 = 4 + rev(4).
$endgroup$
– ConMan
Mar 12 at 22:50
$begingroup$
It's also not necessary, if we always assume that the reverse of a number takes its smallest decimal representation. e.g. 8 = 4 + rev(4).
$endgroup$
– ConMan
Mar 12 at 22:50
$begingroup$
@DonThousand Divisibility by $11$ only works if the number of digits in the seed number is even, or if the seed number is divisible by $11$. $123+321=444$.
$endgroup$
– Mark Bennet
Mar 12 at 22:54
$begingroup$
@DonThousand Divisibility by $11$ only works if the number of digits in the seed number is even, or if the seed number is divisible by $11$. $123+321=444$.
$endgroup$
– Mark Bennet
Mar 12 at 22:54
$begingroup$
@DonThousand It isn't a necessary condition. $444$ is not divisible by $11$
$endgroup$
– Mark Bennet
Mar 12 at 22:57
$begingroup$
@DonThousand It isn't a necessary condition. $444$ is not divisible by $11$
$endgroup$
– Mark Bennet
Mar 12 at 22:57
$begingroup$
Check all natural numbers $0<b<a$ of which there are only a finite number of them.
$endgroup$
– Somos
Mar 12 at 22:59
$begingroup$
Check all natural numbers $0<b<a$ of which there are only a finite number of them.
$endgroup$
– Somos
Mar 12 at 22:59
1
1
$begingroup$
Relevant oeis
$endgroup$
– Don Thousand
Mar 12 at 23:02
$begingroup$
Relevant oeis
$endgroup$
– Don Thousand
Mar 12 at 23:02
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
Let $b = sumlimits_{k=0}^n b_k 10^k$
$b + rev(b) = sumlimits_{k=0}^{n}(b_k + b_{n-k})10^k < 2*10^{k+1}$.
Suppose $a$ is an $n+1$ digit number.
Case 1: The first digit of $a$ is not equal to $1$. Then if $a = b + rev(b)$ then $b$ is also an digit number and $b_0 + b_k < 10$. So the first digit and last digit of $a$ are are $b_0 + b_k$ and equal.
If the first digit and last digit of $a$ are not equal then $a $ is not is not $b+ rev(b)$. If the first digit and last digit or then remove the first digit and last digit, divide by $10$ and repeat the process.
Case 1a: The first and last digit are $1$. To see if $b_0 + b_k = 1$ and $a = b + rev(b)$, revert to case 1. If it fails, continue to case 2.
Case 2: The first digit of $a$ is $1$. If $b_0 + b_k ge 10+ $ last digit of $a = m$ and $a = b + rev (b)$ then subtract $m$ and $m*10^{n-1}$ from $a$. Divide by $10$. Repeat the process.
Either the process will end at a single digit and $a = b+ rev(b)$ or the process will fail and $a ne b + rev (b)$ for any $b$.
Example: $59406 + 60495=119901$ so
so subtract $100001$ to get $19900$ and divide by $10$ to get $1990$. Subtract $10$ and $1000$ to get $980$ and divide by $10$ to get $98$ and that was a failure.
So go back to $119901$ and subtract $11$ and $110000$ so get $9890$ and divide by $10$ to get $989$. Subtract $909$ and get $80$ and divid by $10$ to get $8$. That's a success.
$endgroup$
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%2f3145808%2fhow-to-check-if-some-number-say-a-can-be-expressed-as-a-b-reverseb-whe%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$
Let $b = sumlimits_{k=0}^n b_k 10^k$
$b + rev(b) = sumlimits_{k=0}^{n}(b_k + b_{n-k})10^k < 2*10^{k+1}$.
Suppose $a$ is an $n+1$ digit number.
Case 1: The first digit of $a$ is not equal to $1$. Then if $a = b + rev(b)$ then $b$ is also an digit number and $b_0 + b_k < 10$. So the first digit and last digit of $a$ are are $b_0 + b_k$ and equal.
If the first digit and last digit of $a$ are not equal then $a $ is not is not $b+ rev(b)$. If the first digit and last digit or then remove the first digit and last digit, divide by $10$ and repeat the process.
Case 1a: The first and last digit are $1$. To see if $b_0 + b_k = 1$ and $a = b + rev(b)$, revert to case 1. If it fails, continue to case 2.
Case 2: The first digit of $a$ is $1$. If $b_0 + b_k ge 10+ $ last digit of $a = m$ and $a = b + rev (b)$ then subtract $m$ and $m*10^{n-1}$ from $a$. Divide by $10$. Repeat the process.
Either the process will end at a single digit and $a = b+ rev(b)$ or the process will fail and $a ne b + rev (b)$ for any $b$.
Example: $59406 + 60495=119901$ so
so subtract $100001$ to get $19900$ and divide by $10$ to get $1990$. Subtract $10$ and $1000$ to get $980$ and divide by $10$ to get $98$ and that was a failure.
So go back to $119901$ and subtract $11$ and $110000$ so get $9890$ and divide by $10$ to get $989$. Subtract $909$ and get $80$ and divid by $10$ to get $8$. That's a success.
$endgroup$
add a comment |
$begingroup$
Let $b = sumlimits_{k=0}^n b_k 10^k$
$b + rev(b) = sumlimits_{k=0}^{n}(b_k + b_{n-k})10^k < 2*10^{k+1}$.
Suppose $a$ is an $n+1$ digit number.
Case 1: The first digit of $a$ is not equal to $1$. Then if $a = b + rev(b)$ then $b$ is also an digit number and $b_0 + b_k < 10$. So the first digit and last digit of $a$ are are $b_0 + b_k$ and equal.
If the first digit and last digit of $a$ are not equal then $a $ is not is not $b+ rev(b)$. If the first digit and last digit or then remove the first digit and last digit, divide by $10$ and repeat the process.
Case 1a: The first and last digit are $1$. To see if $b_0 + b_k = 1$ and $a = b + rev(b)$, revert to case 1. If it fails, continue to case 2.
Case 2: The first digit of $a$ is $1$. If $b_0 + b_k ge 10+ $ last digit of $a = m$ and $a = b + rev (b)$ then subtract $m$ and $m*10^{n-1}$ from $a$. Divide by $10$. Repeat the process.
Either the process will end at a single digit and $a = b+ rev(b)$ or the process will fail and $a ne b + rev (b)$ for any $b$.
Example: $59406 + 60495=119901$ so
so subtract $100001$ to get $19900$ and divide by $10$ to get $1990$. Subtract $10$ and $1000$ to get $980$ and divide by $10$ to get $98$ and that was a failure.
So go back to $119901$ and subtract $11$ and $110000$ so get $9890$ and divide by $10$ to get $989$. Subtract $909$ and get $80$ and divid by $10$ to get $8$. That's a success.
$endgroup$
add a comment |
$begingroup$
Let $b = sumlimits_{k=0}^n b_k 10^k$
$b + rev(b) = sumlimits_{k=0}^{n}(b_k + b_{n-k})10^k < 2*10^{k+1}$.
Suppose $a$ is an $n+1$ digit number.
Case 1: The first digit of $a$ is not equal to $1$. Then if $a = b + rev(b)$ then $b$ is also an digit number and $b_0 + b_k < 10$. So the first digit and last digit of $a$ are are $b_0 + b_k$ and equal.
If the first digit and last digit of $a$ are not equal then $a $ is not is not $b+ rev(b)$. If the first digit and last digit or then remove the first digit and last digit, divide by $10$ and repeat the process.
Case 1a: The first and last digit are $1$. To see if $b_0 + b_k = 1$ and $a = b + rev(b)$, revert to case 1. If it fails, continue to case 2.
Case 2: The first digit of $a$ is $1$. If $b_0 + b_k ge 10+ $ last digit of $a = m$ and $a = b + rev (b)$ then subtract $m$ and $m*10^{n-1}$ from $a$. Divide by $10$. Repeat the process.
Either the process will end at a single digit and $a = b+ rev(b)$ or the process will fail and $a ne b + rev (b)$ for any $b$.
Example: $59406 + 60495=119901$ so
so subtract $100001$ to get $19900$ and divide by $10$ to get $1990$. Subtract $10$ and $1000$ to get $980$ and divide by $10$ to get $98$ and that was a failure.
So go back to $119901$ and subtract $11$ and $110000$ so get $9890$ and divide by $10$ to get $989$. Subtract $909$ and get $80$ and divid by $10$ to get $8$. That's a success.
$endgroup$
Let $b = sumlimits_{k=0}^n b_k 10^k$
$b + rev(b) = sumlimits_{k=0}^{n}(b_k + b_{n-k})10^k < 2*10^{k+1}$.
Suppose $a$ is an $n+1$ digit number.
Case 1: The first digit of $a$ is not equal to $1$. Then if $a = b + rev(b)$ then $b$ is also an digit number and $b_0 + b_k < 10$. So the first digit and last digit of $a$ are are $b_0 + b_k$ and equal.
If the first digit and last digit of $a$ are not equal then $a $ is not is not $b+ rev(b)$. If the first digit and last digit or then remove the first digit and last digit, divide by $10$ and repeat the process.
Case 1a: The first and last digit are $1$. To see if $b_0 + b_k = 1$ and $a = b + rev(b)$, revert to case 1. If it fails, continue to case 2.
Case 2: The first digit of $a$ is $1$. If $b_0 + b_k ge 10+ $ last digit of $a = m$ and $a = b + rev (b)$ then subtract $m$ and $m*10^{n-1}$ from $a$. Divide by $10$. Repeat the process.
Either the process will end at a single digit and $a = b+ rev(b)$ or the process will fail and $a ne b + rev (b)$ for any $b$.
Example: $59406 + 60495=119901$ so
so subtract $100001$ to get $19900$ and divide by $10$ to get $1990$. Subtract $10$ and $1000$ to get $980$ and divide by $10$ to get $98$ and that was a failure.
So go back to $119901$ and subtract $11$ and $110000$ so get $9890$ and divide by $10$ to get $989$. Subtract $909$ and get $80$ and divid by $10$ to get $8$. That's a success.
answered Mar 12 at 23:46
fleabloodfleablood
72.8k22788
72.8k22788
add a comment |
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%2f3145808%2fhow-to-check-if-some-number-say-a-can-be-expressed-as-a-b-reverseb-whe%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$
It's also not necessary, if we always assume that the reverse of a number takes its smallest decimal representation. e.g. 8 = 4 + rev(4).
$endgroup$
– ConMan
Mar 12 at 22:50
$begingroup$
@DonThousand Divisibility by $11$ only works if the number of digits in the seed number is even, or if the seed number is divisible by $11$. $123+321=444$.
$endgroup$
– Mark Bennet
Mar 12 at 22:54
$begingroup$
@DonThousand It isn't a necessary condition. $444$ is not divisible by $11$
$endgroup$
– Mark Bennet
Mar 12 at 22:57
$begingroup$
Check all natural numbers $0<b<a$ of which there are only a finite number of them.
$endgroup$
– Somos
Mar 12 at 22:59
1
$begingroup$
Relevant oeis
$endgroup$
– Don Thousand
Mar 12 at 23:02