Finding a formula for $f(n)$: $f(0)=1, f(1)=2, f(n)=2f(n-2)$ for $n ge 2$ The Next CEO of Stack OverflowRecurrence relation $g(n) = g( lfloor n/2rfloor) + lfloorlog_2nrfloor $Find an explicit formula for the recursive sequenceFind the general formula of this sequenceStrong Induction for a sequence inequality?Recursive to explicit formula from power functionProof for Total Overhead Formula for IPv4 FragmentationProve by complete induction a floor formulaCounterexample for floor function: $lfloor x+y rfloor geq lfloor x rfloor + lfloor y rfloor $Completely lost on using strong induction for this proof regarding a recursive algorithm.Find a formula for the sum of the first $n$ even positive numbers
Yu-Gi-Oh cards in Python 3
What steps are necessary to read a Modern SSD in Medieval Europe?
Is fine stranded wire ok for main supply line?
Why do we say 'Un seul M' and not 'Une seule M' even though M is a "consonne"
Which one is the true statement?
Can I board the first leg of the flight without having final country's visa?
(How) Could a medieval fantasy world survive a magic-induced "nuclear winter"?
From jafe to El-Guest
Does the Idaho Potato Commission associate potato skins with healthy eating?
Spaces in which all closed sets are regular closed
Man transported from Alternate World into ours by a Neutrino Detector
Expectation in a stochastic differential equation
Can I calculate next year's exemptions based on this year's refund/amount owed?
Can this note be analyzed as a non-chord tone?
Would a grinding machine be a simple and workable propulsion system for an interplanetary spacecraft?
Inexact numbers as keys in Association?
How to find image of a complex function with given constraints?
Easy to read palindrome checker
How to avoid supervisors with prejudiced views?
Is it correct to say moon starry nights?
Is a distribution that is normal, but highly skewed, considered Gaussian?
Help understanding this unsettling image of Titan, Epimetheus, and Saturn's rings?
Is there a way to save my career from absolute disaster?
Won the lottery - how do I keep the money?
Finding a formula for $f(n)$: $f(0)=1, f(1)=2, f(n)=2f(n-2)$ for $n ge 2$
The Next CEO of Stack OverflowRecurrence relation $g(n) = g( lfloor n/2rfloor) + lfloorlog_2nrfloor $Find an explicit formula for the recursive sequenceFind the general formula of this sequenceStrong Induction for a sequence inequality?Recursive to explicit formula from power functionProof for Total Overhead Formula for IPv4 FragmentationProve by complete induction a floor formulaCounterexample for floor function: $lfloor x+y rfloor geq lfloor x rfloor + lfloor y rfloor $Completely lost on using strong induction for this proof regarding a recursive algorithm.Find a formula for the sum of the first $n$ even positive numbers
$begingroup$
I had a hard time figuring out a formula for this. Is there a trick that could be used?
The formula in the back of the book is $2^lfloor fracn+12rfloor$ for $n > 0$.
discrete-mathematics induction recursion
$endgroup$
add a comment |
$begingroup$
I had a hard time figuring out a formula for this. Is there a trick that could be used?
The formula in the back of the book is $2^lfloor fracn+12rfloor$ for $n > 0$.
discrete-mathematics induction recursion
$endgroup$
add a comment |
$begingroup$
I had a hard time figuring out a formula for this. Is there a trick that could be used?
The formula in the back of the book is $2^lfloor fracn+12rfloor$ for $n > 0$.
discrete-mathematics induction recursion
$endgroup$
I had a hard time figuring out a formula for this. Is there a trick that could be used?
The formula in the back of the book is $2^lfloor fracn+12rfloor$ for $n > 0$.
discrete-mathematics induction recursion
discrete-mathematics induction recursion
asked Mar 27 at 23:49
ElliottElliott
947
947
add a comment |
add a comment |
5 Answers
5
active
oldest
votes
$begingroup$
Experiment with small values of $n$:
$$
beginarrayllrr
n = 2: & quad f(2) = 2 f(0)\
n = 4: & quad f(4) = 2 f(2) = 2 left( ; 2 f(0) ; right) & = & 2^2 f(0)\
n = 6: & quad f(6) = 2 f(4) = 2 left( ; 2^2 f(0) right) & = & 2^4 f(0)\
endarray
$$
Now for odd $n$:
$$
beginarrayllrr
n = 3: & quad f(3) = 2 f(1)\
n = 5: & quad f(5) = 2 f(3) = ldots \
endarray
$$
$endgroup$
add a comment |
$begingroup$
To understand the books answer it helps to notice that
If $n = 2k -1$ is odd then $lfloor frac n+12rfloor = lfloor frac 2k2 rfloor = lfloor k rfloor = k$.
And if $n = 2k$ is even then $lfloor fracn+12rfloor = lfloor frac2k+12 rfloor=lfloor k + frac 12 rfloor= k$.
So this formula is:
If $n = 2k -1$, $f(n) = 2^k$. ANd if $n = 2k$ then $f(n) = 2^k$.
But is that the formula?
Well, as $f(0) = 1$ and $f(2) = 2f(0)= 2$ and $f(4) = 2*f(2)=2*2 =2^2$ and we can see by induction that if $f(2k) = 2^k$ then $f(2k+2) = 2*f(2k) = 2*2^k = 2^k+1$ so, yes the formula works for even numbers.
Likewise as $f(1) =2$ and $f(3) = 2f(1)=2*2=2^2$ and if we assume $f(2k-1)=2^k$ then $f(2k+1) = 2*f(2k-1)=2*2^k = 2^k+1$ so by induction the formula works for odd numbers.
And that's that.
(Although I agree with Bernard; I'd use $f(n) = 2^lceil frac n2rceil$. Thats the same thing as
(If $n= 2k$ then $lceil frac n2rceil = lceil krceil = k = lfloor k + frac 12 rfloor = lfloor frac n+12rfloor$
(If $n= 2k-1$ then $lceil frac n2rceil = lceil k-frac 12rceil = k =frac n+12 = lfloor frac n+12rfloor$)
$endgroup$
add a comment |
$begingroup$
Let $g(n)=f(2n)$. Then $g(n)=2g(n-1)$ from which you can see, by induction, that $g(n)=2^n-1g(1)$. This gives $f(2n)=2^n$. Now verify that $[frac 2n+1 2]=n$ this gives the answer for all even $n$. Now consider $h(n)=g(2n+1)$ and use a similar argument.
$endgroup$
add a comment |
$begingroup$
Because $f(2) = 2*f(0) = 2*1 = 2 = f(1)$, the value is doomed to only change every two numbers. Now only considering the first value, it can clearly be seen it is of the form $2^n$, as each value is twice the previous. Combining these two pieces of knowledge and using the base cases, the given formula can be found.
$endgroup$
add a comment |
$begingroup$
I would write it as
$$f(n)=2^lceil frac n2rceil.$$
You can guess calculating the first values of $f(n)$, then prove it by induction.
Note that $lceilfrac n2rceil=m$ leans that
$$m-1 <frac n2le miff 2m-2<nle 2m.$$
$endgroup$
add a comment |
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%2f3165282%2ffinding-a-formula-for-fn-f0-1-f1-2-fn-2fn-2-for-n-ge-2%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
Experiment with small values of $n$:
$$
beginarrayllrr
n = 2: & quad f(2) = 2 f(0)\
n = 4: & quad f(4) = 2 f(2) = 2 left( ; 2 f(0) ; right) & = & 2^2 f(0)\
n = 6: & quad f(6) = 2 f(4) = 2 left( ; 2^2 f(0) right) & = & 2^4 f(0)\
endarray
$$
Now for odd $n$:
$$
beginarrayllrr
n = 3: & quad f(3) = 2 f(1)\
n = 5: & quad f(5) = 2 f(3) = ldots \
endarray
$$
$endgroup$
add a comment |
$begingroup$
Experiment with small values of $n$:
$$
beginarrayllrr
n = 2: & quad f(2) = 2 f(0)\
n = 4: & quad f(4) = 2 f(2) = 2 left( ; 2 f(0) ; right) & = & 2^2 f(0)\
n = 6: & quad f(6) = 2 f(4) = 2 left( ; 2^2 f(0) right) & = & 2^4 f(0)\
endarray
$$
Now for odd $n$:
$$
beginarrayllrr
n = 3: & quad f(3) = 2 f(1)\
n = 5: & quad f(5) = 2 f(3) = ldots \
endarray
$$
$endgroup$
add a comment |
$begingroup$
Experiment with small values of $n$:
$$
beginarrayllrr
n = 2: & quad f(2) = 2 f(0)\
n = 4: & quad f(4) = 2 f(2) = 2 left( ; 2 f(0) ; right) & = & 2^2 f(0)\
n = 6: & quad f(6) = 2 f(4) = 2 left( ; 2^2 f(0) right) & = & 2^4 f(0)\
endarray
$$
Now for odd $n$:
$$
beginarrayllrr
n = 3: & quad f(3) = 2 f(1)\
n = 5: & quad f(5) = 2 f(3) = ldots \
endarray
$$
$endgroup$
Experiment with small values of $n$:
$$
beginarrayllrr
n = 2: & quad f(2) = 2 f(0)\
n = 4: & quad f(4) = 2 f(2) = 2 left( ; 2 f(0) ; right) & = & 2^2 f(0)\
n = 6: & quad f(6) = 2 f(4) = 2 left( ; 2^2 f(0) right) & = & 2^4 f(0)\
endarray
$$
Now for odd $n$:
$$
beginarrayllrr
n = 3: & quad f(3) = 2 f(1)\
n = 5: & quad f(5) = 2 f(3) = ldots \
endarray
$$
answered Mar 27 at 23:56
avsavs
3,859514
3,859514
add a comment |
add a comment |
$begingroup$
To understand the books answer it helps to notice that
If $n = 2k -1$ is odd then $lfloor frac n+12rfloor = lfloor frac 2k2 rfloor = lfloor k rfloor = k$.
And if $n = 2k$ is even then $lfloor fracn+12rfloor = lfloor frac2k+12 rfloor=lfloor k + frac 12 rfloor= k$.
So this formula is:
If $n = 2k -1$, $f(n) = 2^k$. ANd if $n = 2k$ then $f(n) = 2^k$.
But is that the formula?
Well, as $f(0) = 1$ and $f(2) = 2f(0)= 2$ and $f(4) = 2*f(2)=2*2 =2^2$ and we can see by induction that if $f(2k) = 2^k$ then $f(2k+2) = 2*f(2k) = 2*2^k = 2^k+1$ so, yes the formula works for even numbers.
Likewise as $f(1) =2$ and $f(3) = 2f(1)=2*2=2^2$ and if we assume $f(2k-1)=2^k$ then $f(2k+1) = 2*f(2k-1)=2*2^k = 2^k+1$ so by induction the formula works for odd numbers.
And that's that.
(Although I agree with Bernard; I'd use $f(n) = 2^lceil frac n2rceil$. Thats the same thing as
(If $n= 2k$ then $lceil frac n2rceil = lceil krceil = k = lfloor k + frac 12 rfloor = lfloor frac n+12rfloor$
(If $n= 2k-1$ then $lceil frac n2rceil = lceil k-frac 12rceil = k =frac n+12 = lfloor frac n+12rfloor$)
$endgroup$
add a comment |
$begingroup$
To understand the books answer it helps to notice that
If $n = 2k -1$ is odd then $lfloor frac n+12rfloor = lfloor frac 2k2 rfloor = lfloor k rfloor = k$.
And if $n = 2k$ is even then $lfloor fracn+12rfloor = lfloor frac2k+12 rfloor=lfloor k + frac 12 rfloor= k$.
So this formula is:
If $n = 2k -1$, $f(n) = 2^k$. ANd if $n = 2k$ then $f(n) = 2^k$.
But is that the formula?
Well, as $f(0) = 1$ and $f(2) = 2f(0)= 2$ and $f(4) = 2*f(2)=2*2 =2^2$ and we can see by induction that if $f(2k) = 2^k$ then $f(2k+2) = 2*f(2k) = 2*2^k = 2^k+1$ so, yes the formula works for even numbers.
Likewise as $f(1) =2$ and $f(3) = 2f(1)=2*2=2^2$ and if we assume $f(2k-1)=2^k$ then $f(2k+1) = 2*f(2k-1)=2*2^k = 2^k+1$ so by induction the formula works for odd numbers.
And that's that.
(Although I agree with Bernard; I'd use $f(n) = 2^lceil frac n2rceil$. Thats the same thing as
(If $n= 2k$ then $lceil frac n2rceil = lceil krceil = k = lfloor k + frac 12 rfloor = lfloor frac n+12rfloor$
(If $n= 2k-1$ then $lceil frac n2rceil = lceil k-frac 12rceil = k =frac n+12 = lfloor frac n+12rfloor$)
$endgroup$
add a comment |
$begingroup$
To understand the books answer it helps to notice that
If $n = 2k -1$ is odd then $lfloor frac n+12rfloor = lfloor frac 2k2 rfloor = lfloor k rfloor = k$.
And if $n = 2k$ is even then $lfloor fracn+12rfloor = lfloor frac2k+12 rfloor=lfloor k + frac 12 rfloor= k$.
So this formula is:
If $n = 2k -1$, $f(n) = 2^k$. ANd if $n = 2k$ then $f(n) = 2^k$.
But is that the formula?
Well, as $f(0) = 1$ and $f(2) = 2f(0)= 2$ and $f(4) = 2*f(2)=2*2 =2^2$ and we can see by induction that if $f(2k) = 2^k$ then $f(2k+2) = 2*f(2k) = 2*2^k = 2^k+1$ so, yes the formula works for even numbers.
Likewise as $f(1) =2$ and $f(3) = 2f(1)=2*2=2^2$ and if we assume $f(2k-1)=2^k$ then $f(2k+1) = 2*f(2k-1)=2*2^k = 2^k+1$ so by induction the formula works for odd numbers.
And that's that.
(Although I agree with Bernard; I'd use $f(n) = 2^lceil frac n2rceil$. Thats the same thing as
(If $n= 2k$ then $lceil frac n2rceil = lceil krceil = k = lfloor k + frac 12 rfloor = lfloor frac n+12rfloor$
(If $n= 2k-1$ then $lceil frac n2rceil = lceil k-frac 12rceil = k =frac n+12 = lfloor frac n+12rfloor$)
$endgroup$
To understand the books answer it helps to notice that
If $n = 2k -1$ is odd then $lfloor frac n+12rfloor = lfloor frac 2k2 rfloor = lfloor k rfloor = k$.
And if $n = 2k$ is even then $lfloor fracn+12rfloor = lfloor frac2k+12 rfloor=lfloor k + frac 12 rfloor= k$.
So this formula is:
If $n = 2k -1$, $f(n) = 2^k$. ANd if $n = 2k$ then $f(n) = 2^k$.
But is that the formula?
Well, as $f(0) = 1$ and $f(2) = 2f(0)= 2$ and $f(4) = 2*f(2)=2*2 =2^2$ and we can see by induction that if $f(2k) = 2^k$ then $f(2k+2) = 2*f(2k) = 2*2^k = 2^k+1$ so, yes the formula works for even numbers.
Likewise as $f(1) =2$ and $f(3) = 2f(1)=2*2=2^2$ and if we assume $f(2k-1)=2^k$ then $f(2k+1) = 2*f(2k-1)=2*2^k = 2^k+1$ so by induction the formula works for odd numbers.
And that's that.
(Although I agree with Bernard; I'd use $f(n) = 2^lceil frac n2rceil$. Thats the same thing as
(If $n= 2k$ then $lceil frac n2rceil = lceil krceil = k = lfloor k + frac 12 rfloor = lfloor frac n+12rfloor$
(If $n= 2k-1$ then $lceil frac n2rceil = lceil k-frac 12rceil = k =frac n+12 = lfloor frac n+12rfloor$)
answered Mar 28 at 0:51
fleabloodfleablood
73.7k22891
73.7k22891
add a comment |
add a comment |
$begingroup$
Let $g(n)=f(2n)$. Then $g(n)=2g(n-1)$ from which you can see, by induction, that $g(n)=2^n-1g(1)$. This gives $f(2n)=2^n$. Now verify that $[frac 2n+1 2]=n$ this gives the answer for all even $n$. Now consider $h(n)=g(2n+1)$ and use a similar argument.
$endgroup$
add a comment |
$begingroup$
Let $g(n)=f(2n)$. Then $g(n)=2g(n-1)$ from which you can see, by induction, that $g(n)=2^n-1g(1)$. This gives $f(2n)=2^n$. Now verify that $[frac 2n+1 2]=n$ this gives the answer for all even $n$. Now consider $h(n)=g(2n+1)$ and use a similar argument.
$endgroup$
add a comment |
$begingroup$
Let $g(n)=f(2n)$. Then $g(n)=2g(n-1)$ from which you can see, by induction, that $g(n)=2^n-1g(1)$. This gives $f(2n)=2^n$. Now verify that $[frac 2n+1 2]=n$ this gives the answer for all even $n$. Now consider $h(n)=g(2n+1)$ and use a similar argument.
$endgroup$
Let $g(n)=f(2n)$. Then $g(n)=2g(n-1)$ from which you can see, by induction, that $g(n)=2^n-1g(1)$. This gives $f(2n)=2^n$. Now verify that $[frac 2n+1 2]=n$ this gives the answer for all even $n$. Now consider $h(n)=g(2n+1)$ and use a similar argument.
answered Mar 27 at 23:55
Kavi Rama MurthyKavi Rama Murthy
71.4k53170
71.4k53170
add a comment |
add a comment |
$begingroup$
Because $f(2) = 2*f(0) = 2*1 = 2 = f(1)$, the value is doomed to only change every two numbers. Now only considering the first value, it can clearly be seen it is of the form $2^n$, as each value is twice the previous. Combining these two pieces of knowledge and using the base cases, the given formula can be found.
$endgroup$
add a comment |
$begingroup$
Because $f(2) = 2*f(0) = 2*1 = 2 = f(1)$, the value is doomed to only change every two numbers. Now only considering the first value, it can clearly be seen it is of the form $2^n$, as each value is twice the previous. Combining these two pieces of knowledge and using the base cases, the given formula can be found.
$endgroup$
add a comment |
$begingroup$
Because $f(2) = 2*f(0) = 2*1 = 2 = f(1)$, the value is doomed to only change every two numbers. Now only considering the first value, it can clearly be seen it is of the form $2^n$, as each value is twice the previous. Combining these two pieces of knowledge and using the base cases, the given formula can be found.
$endgroup$
Because $f(2) = 2*f(0) = 2*1 = 2 = f(1)$, the value is doomed to only change every two numbers. Now only considering the first value, it can clearly be seen it is of the form $2^n$, as each value is twice the previous. Combining these two pieces of knowledge and using the base cases, the given formula can be found.
answered Mar 27 at 23:58
LittleKnownMathematicianLittleKnownMathematician
808
808
add a comment |
add a comment |
$begingroup$
I would write it as
$$f(n)=2^lceil frac n2rceil.$$
You can guess calculating the first values of $f(n)$, then prove it by induction.
Note that $lceilfrac n2rceil=m$ leans that
$$m-1 <frac n2le miff 2m-2<nle 2m.$$
$endgroup$
add a comment |
$begingroup$
I would write it as
$$f(n)=2^lceil frac n2rceil.$$
You can guess calculating the first values of $f(n)$, then prove it by induction.
Note that $lceilfrac n2rceil=m$ leans that
$$m-1 <frac n2le miff 2m-2<nle 2m.$$
$endgroup$
add a comment |
$begingroup$
I would write it as
$$f(n)=2^lceil frac n2rceil.$$
You can guess calculating the first values of $f(n)$, then prove it by induction.
Note that $lceilfrac n2rceil=m$ leans that
$$m-1 <frac n2le miff 2m-2<nle 2m.$$
$endgroup$
I would write it as
$$f(n)=2^lceil frac n2rceil.$$
You can guess calculating the first values of $f(n)$, then prove it by induction.
Note that $lceilfrac n2rceil=m$ leans that
$$m-1 <frac n2le miff 2m-2<nle 2m.$$
answered Mar 27 at 23:58
BernardBernard
124k741117
124k741117
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%2f3165282%2ffinding-a-formula-for-fn-f0-1-f1-2-fn-2fn-2-for-n-ge-2%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