Find values of $a$ for which the function is periodic.
$begingroup$
Given a positive integer $m$ consider the sequence ${a_n}$ of positive integers defined by the initial term $a_0=a$ and the recurrence relation
$a_{n+1} = a_n/2$ if $a_n$ is even;
$a_n+m$, if $a_n$ is odd.
Find all values of $a$ for which the sequence is periodic.
I tried some kind of case-checking kind of solution, but that did not lead me anywhere. Please help.
number-theory recurrence-relations
$endgroup$
add a comment |
$begingroup$
Given a positive integer $m$ consider the sequence ${a_n}$ of positive integers defined by the initial term $a_0=a$ and the recurrence relation
$a_{n+1} = a_n/2$ if $a_n$ is even;
$a_n+m$, if $a_n$ is odd.
Find all values of $a$ for which the sequence is periodic.
I tried some kind of case-checking kind of solution, but that did not lead me anywhere. Please help.
number-theory recurrence-relations
$endgroup$
add a comment |
$begingroup$
Given a positive integer $m$ consider the sequence ${a_n}$ of positive integers defined by the initial term $a_0=a$ and the recurrence relation
$a_{n+1} = a_n/2$ if $a_n$ is even;
$a_n+m$, if $a_n$ is odd.
Find all values of $a$ for which the sequence is periodic.
I tried some kind of case-checking kind of solution, but that did not lead me anywhere. Please help.
number-theory recurrence-relations
$endgroup$
Given a positive integer $m$ consider the sequence ${a_n}$ of positive integers defined by the initial term $a_0=a$ and the recurrence relation
$a_{n+1} = a_n/2$ if $a_n$ is even;
$a_n+m$, if $a_n$ is odd.
Find all values of $a$ for which the sequence is periodic.
I tried some kind of case-checking kind of solution, but that did not lead me anywhere. Please help.
number-theory recurrence-relations
number-theory recurrence-relations
edited Jan 12 at 16:47
SinTan1729
2,682723
2,682723
asked Jan 12 at 16:44
YellowYellow
16011
16011
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
Fact 1: If there are two distinct $k_1$ and $k_2$ s.t. $a_{k_1}=a_{k_2}$ then the sequence repeats.
If $m$ is odd (the crux of the problem) then each $a_k$ is no larger than $a_1 + 3m$ [make sure you see why or check the proof below; essentially you get to add by $m$ only once before you have to divide by 2]. As each $a_k$ is positive it follows that $a_k in {1,2,ldots, a_1+3m}$ for all $k$. Therefore it follows from Fact 1 that the sequence repeats.
If $m$ is even and positive then let $i_0$ be the smallest integer such that $a_12^{-i_0}$ is no longer even--or equivalently $2^{-i_0}a_1$ is odd. Then $a_2 = a_12^{-1}$, $ldots ,$ $a_{i_0+1} = 2^{-i_0}a_1$, while $a_{i_0+1+j} = a_12^{-i_0} + jm$ for each nonnegative integer $j$ [make sure you see why; note that $a_{i_0+j+1} = a_12^{-i_0} + jm$ is an odd integer as $a_12^{-i_0}$ is odd and $m$ is even]. So the function is not periodic.
So for a positive integer $m$, the function is periodic iff $m$ is odd, no matter what positive integer $a_1$ is.
[If $m$ is 0 and $a_1 $ is odd then all of the $a_n$s are $a_1$. If $m=0$ and $a_1$ is even then letting $i_0$ be the smallest integer s.t. $a_12^{-i_0}$ is odd, then $a_n=a_12^{-i_0}$ for all $n > i_0$.]
Proof that $a_k< a_1+3m$ for all $k$ if $m$ is odd: We first show that $a_k < a_1+2m$ if $a_k$ is odd, by induction on $k$. Let us assume that $a_{k_0} < a_1+2m$ and that $a_{k_0}$ is odd. Then $a_{k_0+1}=a_{k_0}+m$ is even [as $m$ is odd] and is no greater than $a_1+3m$. Then $a_{k_0+2} = a_{k_0+1}/2$ is no greater than $a_1/2 + 3m/2 < a_1+2m$. So indeed, $a_k < a_1+2m$ if $a_k$ is odd.
Now we claim that $a_k < a_1+3m$ if $a_k$ is even. Indeed, let us use induction on $k$. If $a_{k-1}$ is even then by induction hypthesis $a_{k-1} < a_1+3m$ and $a_k = a_{k-1}/2 < a_{k-1}$ so indeed, $a_k < a_1+3m$ as well. If $a_{k-1}$ is odd then by the previous paragraph $a_{k-1} < a_1+2m$, which implies $a_k < a_1+3m$. Thus indeed, $a_k < a_1+3m$ if $a_k$ is even.
So $a_k < a_1+2m$ if $a_k$ is odd and $a_k < a_1+3m$ if $a_k$ is even, so the $a_k$s are indeed bounded.
$endgroup$
add a comment |
Your Answer
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%2f3071102%2ffind-values-of-a-for-which-the-function-is-periodic%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$
Fact 1: If there are two distinct $k_1$ and $k_2$ s.t. $a_{k_1}=a_{k_2}$ then the sequence repeats.
If $m$ is odd (the crux of the problem) then each $a_k$ is no larger than $a_1 + 3m$ [make sure you see why or check the proof below; essentially you get to add by $m$ only once before you have to divide by 2]. As each $a_k$ is positive it follows that $a_k in {1,2,ldots, a_1+3m}$ for all $k$. Therefore it follows from Fact 1 that the sequence repeats.
If $m$ is even and positive then let $i_0$ be the smallest integer such that $a_12^{-i_0}$ is no longer even--or equivalently $2^{-i_0}a_1$ is odd. Then $a_2 = a_12^{-1}$, $ldots ,$ $a_{i_0+1} = 2^{-i_0}a_1$, while $a_{i_0+1+j} = a_12^{-i_0} + jm$ for each nonnegative integer $j$ [make sure you see why; note that $a_{i_0+j+1} = a_12^{-i_0} + jm$ is an odd integer as $a_12^{-i_0}$ is odd and $m$ is even]. So the function is not periodic.
So for a positive integer $m$, the function is periodic iff $m$ is odd, no matter what positive integer $a_1$ is.
[If $m$ is 0 and $a_1 $ is odd then all of the $a_n$s are $a_1$. If $m=0$ and $a_1$ is even then letting $i_0$ be the smallest integer s.t. $a_12^{-i_0}$ is odd, then $a_n=a_12^{-i_0}$ for all $n > i_0$.]
Proof that $a_k< a_1+3m$ for all $k$ if $m$ is odd: We first show that $a_k < a_1+2m$ if $a_k$ is odd, by induction on $k$. Let us assume that $a_{k_0} < a_1+2m$ and that $a_{k_0}$ is odd. Then $a_{k_0+1}=a_{k_0}+m$ is even [as $m$ is odd] and is no greater than $a_1+3m$. Then $a_{k_0+2} = a_{k_0+1}/2$ is no greater than $a_1/2 + 3m/2 < a_1+2m$. So indeed, $a_k < a_1+2m$ if $a_k$ is odd.
Now we claim that $a_k < a_1+3m$ if $a_k$ is even. Indeed, let us use induction on $k$. If $a_{k-1}$ is even then by induction hypthesis $a_{k-1} < a_1+3m$ and $a_k = a_{k-1}/2 < a_{k-1}$ so indeed, $a_k < a_1+3m$ as well. If $a_{k-1}$ is odd then by the previous paragraph $a_{k-1} < a_1+2m$, which implies $a_k < a_1+3m$. Thus indeed, $a_k < a_1+3m$ if $a_k$ is even.
So $a_k < a_1+2m$ if $a_k$ is odd and $a_k < a_1+3m$ if $a_k$ is even, so the $a_k$s are indeed bounded.
$endgroup$
add a comment |
$begingroup$
Fact 1: If there are two distinct $k_1$ and $k_2$ s.t. $a_{k_1}=a_{k_2}$ then the sequence repeats.
If $m$ is odd (the crux of the problem) then each $a_k$ is no larger than $a_1 + 3m$ [make sure you see why or check the proof below; essentially you get to add by $m$ only once before you have to divide by 2]. As each $a_k$ is positive it follows that $a_k in {1,2,ldots, a_1+3m}$ for all $k$. Therefore it follows from Fact 1 that the sequence repeats.
If $m$ is even and positive then let $i_0$ be the smallest integer such that $a_12^{-i_0}$ is no longer even--or equivalently $2^{-i_0}a_1$ is odd. Then $a_2 = a_12^{-1}$, $ldots ,$ $a_{i_0+1} = 2^{-i_0}a_1$, while $a_{i_0+1+j} = a_12^{-i_0} + jm$ for each nonnegative integer $j$ [make sure you see why; note that $a_{i_0+j+1} = a_12^{-i_0} + jm$ is an odd integer as $a_12^{-i_0}$ is odd and $m$ is even]. So the function is not periodic.
So for a positive integer $m$, the function is periodic iff $m$ is odd, no matter what positive integer $a_1$ is.
[If $m$ is 0 and $a_1 $ is odd then all of the $a_n$s are $a_1$. If $m=0$ and $a_1$ is even then letting $i_0$ be the smallest integer s.t. $a_12^{-i_0}$ is odd, then $a_n=a_12^{-i_0}$ for all $n > i_0$.]
Proof that $a_k< a_1+3m$ for all $k$ if $m$ is odd: We first show that $a_k < a_1+2m$ if $a_k$ is odd, by induction on $k$. Let us assume that $a_{k_0} < a_1+2m$ and that $a_{k_0}$ is odd. Then $a_{k_0+1}=a_{k_0}+m$ is even [as $m$ is odd] and is no greater than $a_1+3m$. Then $a_{k_0+2} = a_{k_0+1}/2$ is no greater than $a_1/2 + 3m/2 < a_1+2m$. So indeed, $a_k < a_1+2m$ if $a_k$ is odd.
Now we claim that $a_k < a_1+3m$ if $a_k$ is even. Indeed, let us use induction on $k$. If $a_{k-1}$ is even then by induction hypthesis $a_{k-1} < a_1+3m$ and $a_k = a_{k-1}/2 < a_{k-1}$ so indeed, $a_k < a_1+3m$ as well. If $a_{k-1}$ is odd then by the previous paragraph $a_{k-1} < a_1+2m$, which implies $a_k < a_1+3m$. Thus indeed, $a_k < a_1+3m$ if $a_k$ is even.
So $a_k < a_1+2m$ if $a_k$ is odd and $a_k < a_1+3m$ if $a_k$ is even, so the $a_k$s are indeed bounded.
$endgroup$
add a comment |
$begingroup$
Fact 1: If there are two distinct $k_1$ and $k_2$ s.t. $a_{k_1}=a_{k_2}$ then the sequence repeats.
If $m$ is odd (the crux of the problem) then each $a_k$ is no larger than $a_1 + 3m$ [make sure you see why or check the proof below; essentially you get to add by $m$ only once before you have to divide by 2]. As each $a_k$ is positive it follows that $a_k in {1,2,ldots, a_1+3m}$ for all $k$. Therefore it follows from Fact 1 that the sequence repeats.
If $m$ is even and positive then let $i_0$ be the smallest integer such that $a_12^{-i_0}$ is no longer even--or equivalently $2^{-i_0}a_1$ is odd. Then $a_2 = a_12^{-1}$, $ldots ,$ $a_{i_0+1} = 2^{-i_0}a_1$, while $a_{i_0+1+j} = a_12^{-i_0} + jm$ for each nonnegative integer $j$ [make sure you see why; note that $a_{i_0+j+1} = a_12^{-i_0} + jm$ is an odd integer as $a_12^{-i_0}$ is odd and $m$ is even]. So the function is not periodic.
So for a positive integer $m$, the function is periodic iff $m$ is odd, no matter what positive integer $a_1$ is.
[If $m$ is 0 and $a_1 $ is odd then all of the $a_n$s are $a_1$. If $m=0$ and $a_1$ is even then letting $i_0$ be the smallest integer s.t. $a_12^{-i_0}$ is odd, then $a_n=a_12^{-i_0}$ for all $n > i_0$.]
Proof that $a_k< a_1+3m$ for all $k$ if $m$ is odd: We first show that $a_k < a_1+2m$ if $a_k$ is odd, by induction on $k$. Let us assume that $a_{k_0} < a_1+2m$ and that $a_{k_0}$ is odd. Then $a_{k_0+1}=a_{k_0}+m$ is even [as $m$ is odd] and is no greater than $a_1+3m$. Then $a_{k_0+2} = a_{k_0+1}/2$ is no greater than $a_1/2 + 3m/2 < a_1+2m$. So indeed, $a_k < a_1+2m$ if $a_k$ is odd.
Now we claim that $a_k < a_1+3m$ if $a_k$ is even. Indeed, let us use induction on $k$. If $a_{k-1}$ is even then by induction hypthesis $a_{k-1} < a_1+3m$ and $a_k = a_{k-1}/2 < a_{k-1}$ so indeed, $a_k < a_1+3m$ as well. If $a_{k-1}$ is odd then by the previous paragraph $a_{k-1} < a_1+2m$, which implies $a_k < a_1+3m$. Thus indeed, $a_k < a_1+3m$ if $a_k$ is even.
So $a_k < a_1+2m$ if $a_k$ is odd and $a_k < a_1+3m$ if $a_k$ is even, so the $a_k$s are indeed bounded.
$endgroup$
Fact 1: If there are two distinct $k_1$ and $k_2$ s.t. $a_{k_1}=a_{k_2}$ then the sequence repeats.
If $m$ is odd (the crux of the problem) then each $a_k$ is no larger than $a_1 + 3m$ [make sure you see why or check the proof below; essentially you get to add by $m$ only once before you have to divide by 2]. As each $a_k$ is positive it follows that $a_k in {1,2,ldots, a_1+3m}$ for all $k$. Therefore it follows from Fact 1 that the sequence repeats.
If $m$ is even and positive then let $i_0$ be the smallest integer such that $a_12^{-i_0}$ is no longer even--or equivalently $2^{-i_0}a_1$ is odd. Then $a_2 = a_12^{-1}$, $ldots ,$ $a_{i_0+1} = 2^{-i_0}a_1$, while $a_{i_0+1+j} = a_12^{-i_0} + jm$ for each nonnegative integer $j$ [make sure you see why; note that $a_{i_0+j+1} = a_12^{-i_0} + jm$ is an odd integer as $a_12^{-i_0}$ is odd and $m$ is even]. So the function is not periodic.
So for a positive integer $m$, the function is periodic iff $m$ is odd, no matter what positive integer $a_1$ is.
[If $m$ is 0 and $a_1 $ is odd then all of the $a_n$s are $a_1$. If $m=0$ and $a_1$ is even then letting $i_0$ be the smallest integer s.t. $a_12^{-i_0}$ is odd, then $a_n=a_12^{-i_0}$ for all $n > i_0$.]
Proof that $a_k< a_1+3m$ for all $k$ if $m$ is odd: We first show that $a_k < a_1+2m$ if $a_k$ is odd, by induction on $k$. Let us assume that $a_{k_0} < a_1+2m$ and that $a_{k_0}$ is odd. Then $a_{k_0+1}=a_{k_0}+m$ is even [as $m$ is odd] and is no greater than $a_1+3m$. Then $a_{k_0+2} = a_{k_0+1}/2$ is no greater than $a_1/2 + 3m/2 < a_1+2m$. So indeed, $a_k < a_1+2m$ if $a_k$ is odd.
Now we claim that $a_k < a_1+3m$ if $a_k$ is even. Indeed, let us use induction on $k$. If $a_{k-1}$ is even then by induction hypthesis $a_{k-1} < a_1+3m$ and $a_k = a_{k-1}/2 < a_{k-1}$ so indeed, $a_k < a_1+3m$ as well. If $a_{k-1}$ is odd then by the previous paragraph $a_{k-1} < a_1+2m$, which implies $a_k < a_1+3m$. Thus indeed, $a_k < a_1+3m$ if $a_k$ is even.
So $a_k < a_1+2m$ if $a_k$ is odd and $a_k < a_1+3m$ if $a_k$ is even, so the $a_k$s are indeed bounded.
edited Jan 12 at 23:21
answered Jan 12 at 17:00
MikeMike
4,641512
4,641512
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%2f3071102%2ffind-values-of-a-for-which-the-function-is-periodic%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