$leftlfloor fraca-b2 rightrfloor + leftlceil fraca+b2 rightrceil = a$ when $a,b$ are integers? [closed]
Clash Royale CLAN TAG#URR8PPP
$begingroup$
Let $a$ and $b$ be positive integers.
If $b$ is even, then we have $$leftlfloor fraca-b2 rightrfloor + leftlceil fraca+b2 rightrceil = a$$
I think the equality also hold when $b$ is odd. What could be a proof for it?
floor-function ceiling-function
$endgroup$
closed as off-topic by user21820, Lord_Farin, Did, RRL, Trevor Gunn Jan 28 at 16:37
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question is missing context or other details: Please provide additional context, which ideally explains why the question is relevant to you and our community. Some forms of context include: background and motivation, relevant definitions, source, possible strategies, your current progress, why the question is interesting or important, etc." – user21820, Lord_Farin, Did, RRL, Trevor Gunn
add a comment |
$begingroup$
Let $a$ and $b$ be positive integers.
If $b$ is even, then we have $$leftlfloor fraca-b2 rightrfloor + leftlceil fraca+b2 rightrceil = a$$
I think the equality also hold when $b$ is odd. What could be a proof for it?
floor-function ceiling-function
$endgroup$
closed as off-topic by user21820, Lord_Farin, Did, RRL, Trevor Gunn Jan 28 at 16:37
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question is missing context or other details: Please provide additional context, which ideally explains why the question is relevant to you and our community. Some forms of context include: background and motivation, relevant definitions, source, possible strategies, your current progress, why the question is interesting or important, etc." – user21820, Lord_Farin, Did, RRL, Trevor Gunn
$begingroup$
Write $b$ as $2k + 1$, where $k$ is a nonnegative integer. Then look at two cases: $a = 2s$ ($s$ a positive integer), and $a = 2s + 1$ ($s$ a nonnegative integer). What do you get for the left-hand side in each case? [You can show your work by clicking "edit" beneath your question.]
$endgroup$
– John Hughes
Jan 25 at 12:58
1
$begingroup$
@JohnHughes why are you presuming the existence of work? Perhaps they have no work and no idea, and to now do work and retroactively add it to the question would be the equivalent of answering it, so they shouldn't edit to add new work that wasn't done before originally asking.
$endgroup$
– The Great Duck
Jan 26 at 1:32
$begingroup$
You might notice that my comment appeared a few minutes after the question was asked, and before lots of other folks posted answers. Either way, I generally like to lead people in the direction of answering their own questions when I can (esp. when they look to me like homework questions).
$endgroup$
– John Hughes
Jan 26 at 3:23
add a comment |
$begingroup$
Let $a$ and $b$ be positive integers.
If $b$ is even, then we have $$leftlfloor fraca-b2 rightrfloor + leftlceil fraca+b2 rightrceil = a$$
I think the equality also hold when $b$ is odd. What could be a proof for it?
floor-function ceiling-function
$endgroup$
Let $a$ and $b$ be positive integers.
If $b$ is even, then we have $$leftlfloor fraca-b2 rightrfloor + leftlceil fraca+b2 rightrceil = a$$
I think the equality also hold when $b$ is odd. What could be a proof for it?
floor-function ceiling-function
floor-function ceiling-function
edited Jan 26 at 10:12
user21820
38.9k543153
38.9k543153
asked Jan 25 at 12:49
Adam54Adam54
895
895
closed as off-topic by user21820, Lord_Farin, Did, RRL, Trevor Gunn Jan 28 at 16:37
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question is missing context or other details: Please provide additional context, which ideally explains why the question is relevant to you and our community. Some forms of context include: background and motivation, relevant definitions, source, possible strategies, your current progress, why the question is interesting or important, etc." – user21820, Lord_Farin, Did, RRL, Trevor Gunn
closed as off-topic by user21820, Lord_Farin, Did, RRL, Trevor Gunn Jan 28 at 16:37
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question is missing context or other details: Please provide additional context, which ideally explains why the question is relevant to you and our community. Some forms of context include: background and motivation, relevant definitions, source, possible strategies, your current progress, why the question is interesting or important, etc." – user21820, Lord_Farin, Did, RRL, Trevor Gunn
$begingroup$
Write $b$ as $2k + 1$, where $k$ is a nonnegative integer. Then look at two cases: $a = 2s$ ($s$ a positive integer), and $a = 2s + 1$ ($s$ a nonnegative integer). What do you get for the left-hand side in each case? [You can show your work by clicking "edit" beneath your question.]
$endgroup$
– John Hughes
Jan 25 at 12:58
1
$begingroup$
@JohnHughes why are you presuming the existence of work? Perhaps they have no work and no idea, and to now do work and retroactively add it to the question would be the equivalent of answering it, so they shouldn't edit to add new work that wasn't done before originally asking.
$endgroup$
– The Great Duck
Jan 26 at 1:32
$begingroup$
You might notice that my comment appeared a few minutes after the question was asked, and before lots of other folks posted answers. Either way, I generally like to lead people in the direction of answering their own questions when I can (esp. when they look to me like homework questions).
$endgroup$
– John Hughes
Jan 26 at 3:23
add a comment |
$begingroup$
Write $b$ as $2k + 1$, where $k$ is a nonnegative integer. Then look at two cases: $a = 2s$ ($s$ a positive integer), and $a = 2s + 1$ ($s$ a nonnegative integer). What do you get for the left-hand side in each case? [You can show your work by clicking "edit" beneath your question.]
$endgroup$
– John Hughes
Jan 25 at 12:58
1
$begingroup$
@JohnHughes why are you presuming the existence of work? Perhaps they have no work and no idea, and to now do work and retroactively add it to the question would be the equivalent of answering it, so they shouldn't edit to add new work that wasn't done before originally asking.
$endgroup$
– The Great Duck
Jan 26 at 1:32
$begingroup$
You might notice that my comment appeared a few minutes after the question was asked, and before lots of other folks posted answers. Either way, I generally like to lead people in the direction of answering their own questions when I can (esp. when they look to me like homework questions).
$endgroup$
– John Hughes
Jan 26 at 3:23
$begingroup$
Write $b$ as $2k + 1$, where $k$ is a nonnegative integer. Then look at two cases: $a = 2s$ ($s$ a positive integer), and $a = 2s + 1$ ($s$ a nonnegative integer). What do you get for the left-hand side in each case? [You can show your work by clicking "edit" beneath your question.]
$endgroup$
– John Hughes
Jan 25 at 12:58
$begingroup$
Write $b$ as $2k + 1$, where $k$ is a nonnegative integer. Then look at two cases: $a = 2s$ ($s$ a positive integer), and $a = 2s + 1$ ($s$ a nonnegative integer). What do you get for the left-hand side in each case? [You can show your work by clicking "edit" beneath your question.]
$endgroup$
– John Hughes
Jan 25 at 12:58
1
1
$begingroup$
@JohnHughes why are you presuming the existence of work? Perhaps they have no work and no idea, and to now do work and retroactively add it to the question would be the equivalent of answering it, so they shouldn't edit to add new work that wasn't done before originally asking.
$endgroup$
– The Great Duck
Jan 26 at 1:32
$begingroup$
@JohnHughes why are you presuming the existence of work? Perhaps they have no work and no idea, and to now do work and retroactively add it to the question would be the equivalent of answering it, so they shouldn't edit to add new work that wasn't done before originally asking.
$endgroup$
– The Great Duck
Jan 26 at 1:32
$begingroup$
You might notice that my comment appeared a few minutes after the question was asked, and before lots of other folks posted answers. Either way, I generally like to lead people in the direction of answering their own questions when I can (esp. when they look to me like homework questions).
$endgroup$
– John Hughes
Jan 26 at 3:23
$begingroup$
You might notice that my comment appeared a few minutes after the question was asked, and before lots of other folks posted answers. Either way, I generally like to lead people in the direction of answering their own questions when I can (esp. when they look to me like homework questions).
$endgroup$
– John Hughes
Jan 26 at 3:23
add a comment |
5 Answers
5
active
oldest
votes
$begingroup$
If $a$ and $b$ are both odd (or both even), then $a-b$ and $a+b$ are both even, and thus $$leftlfloor fraca-b2 rightrfloor = fraca-b2 quadtextandquad leftlceil fraca+b2 rightrceil = fraca+b2.$$
Otherwise, if exactly one of $a$ and $b$ is odd, then $a-b$ and $a+b$ are both odd, and thus $$leftlfloor fraca-b2 rightrfloor = fraca-b2 - frac12 quadtextandquad leftlceil fraca+b2 rightrceil = fraca+b2 + frac12.$$
In either case, it's easy to check that your equation holds.
BTW, as noted by Gareth McCaughan, your equation in fact holds for all real numbers $b$, as long as $a$ is an integer. One fairly simple way to show this is to note that $fraca+b2 = a - fraca-b2.$ Thus, we can rewrite your equation as $$leftlfloor fraca-b2 rightrfloor + leftlceil a - fraca-b2 rightrceil = a.$$
Since $a$ is an integer (by assumption), and since $lceil k + x rceil = k + lceil x rceil$ for any integer $k$, we can extract $a$ from the ceiling term to get $$leftlfloor fraca-b2 rightrfloor + a + leftlceil - fraca-b2 rightrceil = a,$$ and finally, by applying the identity $lceil -x rceil = - lfloor x rfloor$, rewrite this as $$leftlfloor fraca-b2 rightrfloor + a - leftlfloor fraca-b2 rightrfloor = a.$$ Cancelling the floor terms then just leaves the identity $a = a$.
On the other hand, as also noted by Gareth, your equation cannot hold for any non-integer $a$, since its left-hand side is always an integer.
$endgroup$
1
$begingroup$
Thank you very much for the odd case, made very simple!
$endgroup$
– Adam54
Jan 25 at 13:05
add a comment |
$begingroup$
The equality only depends on the parity of $a+b$, as it is the same as that of $a-b$. Then
$$leftlfloorfrac02rightrfloor+leftlceilfrac02rightrceil=0$$
and
$$leftlfloorfrac12rightrfloor+leftlceilfrac12rightrceil=1$$
are enough as a proof.
$endgroup$
add a comment |
$begingroup$
This actually works whatever the value of $b$ -- it doesn't need to be an integer. Clearly it's true when $b=0$. Now imagine changing $b$ smoothly from $0$ to its final value. When does the value of our expression change? Precisely when $(a+b)/2$ or $(a-b)/2$ passes an integer; that is, when $apm b$ is an even integer; that is, when $b$ differs from $a$ by an even integer. When this happens, both terms change in opposite ways, so the expression as a whole doesn't change its value. So by the time $b$ reaches its final value, our expression still hasn't changed.
(On the other hand, if $a$ isn't an integer then the equation never holds because one side is an integer and the other isn't.)
$endgroup$
add a comment |
$begingroup$
If $a$ and $b$ are both odd then we have $a=2m+1$ and $b=2n+1$ where $m$ and $n$ are positive integers.
Then, we have beginalignleftlfloorfraca-b2rightrfloor+leftlceilfraca+b2rightrceil &= leftlfloorfrac(2m+1)-(2n+1)2rightrfloor+ leftlceilfrac(2m+1)+(2n+1)2rightrceil\
&=leftlfloorfrac2m-2n2rightrfloor+ leftlceilfrac2m+2n+22rightrceil\
&=lfloor m-nrfloor + lceil m+n+1rceil\
&= m-n + m+n+1tag$*$\
&= 2m+1\
&=aendalign
We can get to $(*)$ because $m$ and $n$ are integers and so their floor (or ceiling) is just the number inside (two integers added or subtracted will always give an integer answer).
If $a$ is even and $b$ is odd, then we have $a=2m$ and $b=2n+1$, again for $m$ and $n$ integers.
So we have beginalignleftlfloorfraca-b2rightrfloor+leftlceilfraca+b2rightrceil &= leftlfloorfrac(2m)-(2n+1)2rightrfloor+ leftlceilfrac(2m)+(2n+1)2rightrceil\
&=leftlfloorfrac2m-2n-12rightrfloor+ leftlceilfrac2m+2n+12rightrceil\
&=leftlfloor m-n-frac 12rightrfloor + leftlceil m+n+frac12rightrceil\
&= m-n -1+ m+n+1tag$dagger$\
&= 2m\
&=aendalign
Here we get to $(dagger)$ because we round the first half down and the second half up to their respective nearest integers
$endgroup$
add a comment |
$begingroup$
As $s:=a+b$ and $a-b$ have the same parity, we can write
$$leftlfloorfracs-2b2rightrfloor+leftlceilfrac s2rightrceil=leftlfloorfrac s2rightrfloor+leftlceilfrac s2rightrceil-b=s-b=a.$$
$endgroup$
add a comment |
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
If $a$ and $b$ are both odd (or both even), then $a-b$ and $a+b$ are both even, and thus $$leftlfloor fraca-b2 rightrfloor = fraca-b2 quadtextandquad leftlceil fraca+b2 rightrceil = fraca+b2.$$
Otherwise, if exactly one of $a$ and $b$ is odd, then $a-b$ and $a+b$ are both odd, and thus $$leftlfloor fraca-b2 rightrfloor = fraca-b2 - frac12 quadtextandquad leftlceil fraca+b2 rightrceil = fraca+b2 + frac12.$$
In either case, it's easy to check that your equation holds.
BTW, as noted by Gareth McCaughan, your equation in fact holds for all real numbers $b$, as long as $a$ is an integer. One fairly simple way to show this is to note that $fraca+b2 = a - fraca-b2.$ Thus, we can rewrite your equation as $$leftlfloor fraca-b2 rightrfloor + leftlceil a - fraca-b2 rightrceil = a.$$
Since $a$ is an integer (by assumption), and since $lceil k + x rceil = k + lceil x rceil$ for any integer $k$, we can extract $a$ from the ceiling term to get $$leftlfloor fraca-b2 rightrfloor + a + leftlceil - fraca-b2 rightrceil = a,$$ and finally, by applying the identity $lceil -x rceil = - lfloor x rfloor$, rewrite this as $$leftlfloor fraca-b2 rightrfloor + a - leftlfloor fraca-b2 rightrfloor = a.$$ Cancelling the floor terms then just leaves the identity $a = a$.
On the other hand, as also noted by Gareth, your equation cannot hold for any non-integer $a$, since its left-hand side is always an integer.
$endgroup$
1
$begingroup$
Thank you very much for the odd case, made very simple!
$endgroup$
– Adam54
Jan 25 at 13:05
add a comment |
$begingroup$
If $a$ and $b$ are both odd (or both even), then $a-b$ and $a+b$ are both even, and thus $$leftlfloor fraca-b2 rightrfloor = fraca-b2 quadtextandquad leftlceil fraca+b2 rightrceil = fraca+b2.$$
Otherwise, if exactly one of $a$ and $b$ is odd, then $a-b$ and $a+b$ are both odd, and thus $$leftlfloor fraca-b2 rightrfloor = fraca-b2 - frac12 quadtextandquad leftlceil fraca+b2 rightrceil = fraca+b2 + frac12.$$
In either case, it's easy to check that your equation holds.
BTW, as noted by Gareth McCaughan, your equation in fact holds for all real numbers $b$, as long as $a$ is an integer. One fairly simple way to show this is to note that $fraca+b2 = a - fraca-b2.$ Thus, we can rewrite your equation as $$leftlfloor fraca-b2 rightrfloor + leftlceil a - fraca-b2 rightrceil = a.$$
Since $a$ is an integer (by assumption), and since $lceil k + x rceil = k + lceil x rceil$ for any integer $k$, we can extract $a$ from the ceiling term to get $$leftlfloor fraca-b2 rightrfloor + a + leftlceil - fraca-b2 rightrceil = a,$$ and finally, by applying the identity $lceil -x rceil = - lfloor x rfloor$, rewrite this as $$leftlfloor fraca-b2 rightrfloor + a - leftlfloor fraca-b2 rightrfloor = a.$$ Cancelling the floor terms then just leaves the identity $a = a$.
On the other hand, as also noted by Gareth, your equation cannot hold for any non-integer $a$, since its left-hand side is always an integer.
$endgroup$
1
$begingroup$
Thank you very much for the odd case, made very simple!
$endgroup$
– Adam54
Jan 25 at 13:05
add a comment |
$begingroup$
If $a$ and $b$ are both odd (or both even), then $a-b$ and $a+b$ are both even, and thus $$leftlfloor fraca-b2 rightrfloor = fraca-b2 quadtextandquad leftlceil fraca+b2 rightrceil = fraca+b2.$$
Otherwise, if exactly one of $a$ and $b$ is odd, then $a-b$ and $a+b$ are both odd, and thus $$leftlfloor fraca-b2 rightrfloor = fraca-b2 - frac12 quadtextandquad leftlceil fraca+b2 rightrceil = fraca+b2 + frac12.$$
In either case, it's easy to check that your equation holds.
BTW, as noted by Gareth McCaughan, your equation in fact holds for all real numbers $b$, as long as $a$ is an integer. One fairly simple way to show this is to note that $fraca+b2 = a - fraca-b2.$ Thus, we can rewrite your equation as $$leftlfloor fraca-b2 rightrfloor + leftlceil a - fraca-b2 rightrceil = a.$$
Since $a$ is an integer (by assumption), and since $lceil k + x rceil = k + lceil x rceil$ for any integer $k$, we can extract $a$ from the ceiling term to get $$leftlfloor fraca-b2 rightrfloor + a + leftlceil - fraca-b2 rightrceil = a,$$ and finally, by applying the identity $lceil -x rceil = - lfloor x rfloor$, rewrite this as $$leftlfloor fraca-b2 rightrfloor + a - leftlfloor fraca-b2 rightrfloor = a.$$ Cancelling the floor terms then just leaves the identity $a = a$.
On the other hand, as also noted by Gareth, your equation cannot hold for any non-integer $a$, since its left-hand side is always an integer.
$endgroup$
If $a$ and $b$ are both odd (or both even), then $a-b$ and $a+b$ are both even, and thus $$leftlfloor fraca-b2 rightrfloor = fraca-b2 quadtextandquad leftlceil fraca+b2 rightrceil = fraca+b2.$$
Otherwise, if exactly one of $a$ and $b$ is odd, then $a-b$ and $a+b$ are both odd, and thus $$leftlfloor fraca-b2 rightrfloor = fraca-b2 - frac12 quadtextandquad leftlceil fraca+b2 rightrceil = fraca+b2 + frac12.$$
In either case, it's easy to check that your equation holds.
BTW, as noted by Gareth McCaughan, your equation in fact holds for all real numbers $b$, as long as $a$ is an integer. One fairly simple way to show this is to note that $fraca+b2 = a - fraca-b2.$ Thus, we can rewrite your equation as $$leftlfloor fraca-b2 rightrfloor + leftlceil a - fraca-b2 rightrceil = a.$$
Since $a$ is an integer (by assumption), and since $lceil k + x rceil = k + lceil x rceil$ for any integer $k$, we can extract $a$ from the ceiling term to get $$leftlfloor fraca-b2 rightrfloor + a + leftlceil - fraca-b2 rightrceil = a,$$ and finally, by applying the identity $lceil -x rceil = - lfloor x rfloor$, rewrite this as $$leftlfloor fraca-b2 rightrfloor + a - leftlfloor fraca-b2 rightrfloor = a.$$ Cancelling the floor terms then just leaves the identity $a = a$.
On the other hand, as also noted by Gareth, your equation cannot hold for any non-integer $a$, since its left-hand side is always an integer.
edited Jan 26 at 1:12
answered Jan 25 at 13:03
Ilmari KaronenIlmari Karonen
19.9k25186
19.9k25186
1
$begingroup$
Thank you very much for the odd case, made very simple!
$endgroup$
– Adam54
Jan 25 at 13:05
add a comment |
1
$begingroup$
Thank you very much for the odd case, made very simple!
$endgroup$
– Adam54
Jan 25 at 13:05
1
1
$begingroup$
Thank you very much for the odd case, made very simple!
$endgroup$
– Adam54
Jan 25 at 13:05
$begingroup$
Thank you very much for the odd case, made very simple!
$endgroup$
– Adam54
Jan 25 at 13:05
add a comment |
$begingroup$
The equality only depends on the parity of $a+b$, as it is the same as that of $a-b$. Then
$$leftlfloorfrac02rightrfloor+leftlceilfrac02rightrceil=0$$
and
$$leftlfloorfrac12rightrfloor+leftlceilfrac12rightrceil=1$$
are enough as a proof.
$endgroup$
add a comment |
$begingroup$
The equality only depends on the parity of $a+b$, as it is the same as that of $a-b$. Then
$$leftlfloorfrac02rightrfloor+leftlceilfrac02rightrceil=0$$
and
$$leftlfloorfrac12rightrfloor+leftlceilfrac12rightrceil=1$$
are enough as a proof.
$endgroup$
add a comment |
$begingroup$
The equality only depends on the parity of $a+b$, as it is the same as that of $a-b$. Then
$$leftlfloorfrac02rightrfloor+leftlceilfrac02rightrceil=0$$
and
$$leftlfloorfrac12rightrfloor+leftlceilfrac12rightrceil=1$$
are enough as a proof.
$endgroup$
The equality only depends on the parity of $a+b$, as it is the same as that of $a-b$. Then
$$leftlfloorfrac02rightrfloor+leftlceilfrac02rightrceil=0$$
and
$$leftlfloorfrac12rightrfloor+leftlceilfrac12rightrceil=1$$
are enough as a proof.
answered Jan 25 at 13:01
Yves DaoustYves Daoust
128k673226
128k673226
add a comment |
add a comment |
$begingroup$
This actually works whatever the value of $b$ -- it doesn't need to be an integer. Clearly it's true when $b=0$. Now imagine changing $b$ smoothly from $0$ to its final value. When does the value of our expression change? Precisely when $(a+b)/2$ or $(a-b)/2$ passes an integer; that is, when $apm b$ is an even integer; that is, when $b$ differs from $a$ by an even integer. When this happens, both terms change in opposite ways, so the expression as a whole doesn't change its value. So by the time $b$ reaches its final value, our expression still hasn't changed.
(On the other hand, if $a$ isn't an integer then the equation never holds because one side is an integer and the other isn't.)
$endgroup$
add a comment |
$begingroup$
This actually works whatever the value of $b$ -- it doesn't need to be an integer. Clearly it's true when $b=0$. Now imagine changing $b$ smoothly from $0$ to its final value. When does the value of our expression change? Precisely when $(a+b)/2$ or $(a-b)/2$ passes an integer; that is, when $apm b$ is an even integer; that is, when $b$ differs from $a$ by an even integer. When this happens, both terms change in opposite ways, so the expression as a whole doesn't change its value. So by the time $b$ reaches its final value, our expression still hasn't changed.
(On the other hand, if $a$ isn't an integer then the equation never holds because one side is an integer and the other isn't.)
$endgroup$
add a comment |
$begingroup$
This actually works whatever the value of $b$ -- it doesn't need to be an integer. Clearly it's true when $b=0$. Now imagine changing $b$ smoothly from $0$ to its final value. When does the value of our expression change? Precisely when $(a+b)/2$ or $(a-b)/2$ passes an integer; that is, when $apm b$ is an even integer; that is, when $b$ differs from $a$ by an even integer. When this happens, both terms change in opposite ways, so the expression as a whole doesn't change its value. So by the time $b$ reaches its final value, our expression still hasn't changed.
(On the other hand, if $a$ isn't an integer then the equation never holds because one side is an integer and the other isn't.)
$endgroup$
This actually works whatever the value of $b$ -- it doesn't need to be an integer. Clearly it's true when $b=0$. Now imagine changing $b$ smoothly from $0$ to its final value. When does the value of our expression change? Precisely when $(a+b)/2$ or $(a-b)/2$ passes an integer; that is, when $apm b$ is an even integer; that is, when $b$ differs from $a$ by an even integer. When this happens, both terms change in opposite ways, so the expression as a whole doesn't change its value. So by the time $b$ reaches its final value, our expression still hasn't changed.
(On the other hand, if $a$ isn't an integer then the equation never holds because one side is an integer and the other isn't.)
answered Jan 25 at 13:39
Gareth McCaughanGareth McCaughan
3,4281113
3,4281113
add a comment |
add a comment |
$begingroup$
If $a$ and $b$ are both odd then we have $a=2m+1$ and $b=2n+1$ where $m$ and $n$ are positive integers.
Then, we have beginalignleftlfloorfraca-b2rightrfloor+leftlceilfraca+b2rightrceil &= leftlfloorfrac(2m+1)-(2n+1)2rightrfloor+ leftlceilfrac(2m+1)+(2n+1)2rightrceil\
&=leftlfloorfrac2m-2n2rightrfloor+ leftlceilfrac2m+2n+22rightrceil\
&=lfloor m-nrfloor + lceil m+n+1rceil\
&= m-n + m+n+1tag$*$\
&= 2m+1\
&=aendalign
We can get to $(*)$ because $m$ and $n$ are integers and so their floor (or ceiling) is just the number inside (two integers added or subtracted will always give an integer answer).
If $a$ is even and $b$ is odd, then we have $a=2m$ and $b=2n+1$, again for $m$ and $n$ integers.
So we have beginalignleftlfloorfraca-b2rightrfloor+leftlceilfraca+b2rightrceil &= leftlfloorfrac(2m)-(2n+1)2rightrfloor+ leftlceilfrac(2m)+(2n+1)2rightrceil\
&=leftlfloorfrac2m-2n-12rightrfloor+ leftlceilfrac2m+2n+12rightrceil\
&=leftlfloor m-n-frac 12rightrfloor + leftlceil m+n+frac12rightrceil\
&= m-n -1+ m+n+1tag$dagger$\
&= 2m\
&=aendalign
Here we get to $(dagger)$ because we round the first half down and the second half up to their respective nearest integers
$endgroup$
add a comment |
$begingroup$
If $a$ and $b$ are both odd then we have $a=2m+1$ and $b=2n+1$ where $m$ and $n$ are positive integers.
Then, we have beginalignleftlfloorfraca-b2rightrfloor+leftlceilfraca+b2rightrceil &= leftlfloorfrac(2m+1)-(2n+1)2rightrfloor+ leftlceilfrac(2m+1)+(2n+1)2rightrceil\
&=leftlfloorfrac2m-2n2rightrfloor+ leftlceilfrac2m+2n+22rightrceil\
&=lfloor m-nrfloor + lceil m+n+1rceil\
&= m-n + m+n+1tag$*$\
&= 2m+1\
&=aendalign
We can get to $(*)$ because $m$ and $n$ are integers and so their floor (or ceiling) is just the number inside (two integers added or subtracted will always give an integer answer).
If $a$ is even and $b$ is odd, then we have $a=2m$ and $b=2n+1$, again for $m$ and $n$ integers.
So we have beginalignleftlfloorfraca-b2rightrfloor+leftlceilfraca+b2rightrceil &= leftlfloorfrac(2m)-(2n+1)2rightrfloor+ leftlceilfrac(2m)+(2n+1)2rightrceil\
&=leftlfloorfrac2m-2n-12rightrfloor+ leftlceilfrac2m+2n+12rightrceil\
&=leftlfloor m-n-frac 12rightrfloor + leftlceil m+n+frac12rightrceil\
&= m-n -1+ m+n+1tag$dagger$\
&= 2m\
&=aendalign
Here we get to $(dagger)$ because we round the first half down and the second half up to their respective nearest integers
$endgroup$
add a comment |
$begingroup$
If $a$ and $b$ are both odd then we have $a=2m+1$ and $b=2n+1$ where $m$ and $n$ are positive integers.
Then, we have beginalignleftlfloorfraca-b2rightrfloor+leftlceilfraca+b2rightrceil &= leftlfloorfrac(2m+1)-(2n+1)2rightrfloor+ leftlceilfrac(2m+1)+(2n+1)2rightrceil\
&=leftlfloorfrac2m-2n2rightrfloor+ leftlceilfrac2m+2n+22rightrceil\
&=lfloor m-nrfloor + lceil m+n+1rceil\
&= m-n + m+n+1tag$*$\
&= 2m+1\
&=aendalign
We can get to $(*)$ because $m$ and $n$ are integers and so their floor (or ceiling) is just the number inside (two integers added or subtracted will always give an integer answer).
If $a$ is even and $b$ is odd, then we have $a=2m$ and $b=2n+1$, again for $m$ and $n$ integers.
So we have beginalignleftlfloorfraca-b2rightrfloor+leftlceilfraca+b2rightrceil &= leftlfloorfrac(2m)-(2n+1)2rightrfloor+ leftlceilfrac(2m)+(2n+1)2rightrceil\
&=leftlfloorfrac2m-2n-12rightrfloor+ leftlceilfrac2m+2n+12rightrceil\
&=leftlfloor m-n-frac 12rightrfloor + leftlceil m+n+frac12rightrceil\
&= m-n -1+ m+n+1tag$dagger$\
&= 2m\
&=aendalign
Here we get to $(dagger)$ because we round the first half down and the second half up to their respective nearest integers
$endgroup$
If $a$ and $b$ are both odd then we have $a=2m+1$ and $b=2n+1$ where $m$ and $n$ are positive integers.
Then, we have beginalignleftlfloorfraca-b2rightrfloor+leftlceilfraca+b2rightrceil &= leftlfloorfrac(2m+1)-(2n+1)2rightrfloor+ leftlceilfrac(2m+1)+(2n+1)2rightrceil\
&=leftlfloorfrac2m-2n2rightrfloor+ leftlceilfrac2m+2n+22rightrceil\
&=lfloor m-nrfloor + lceil m+n+1rceil\
&= m-n + m+n+1tag$*$\
&= 2m+1\
&=aendalign
We can get to $(*)$ because $m$ and $n$ are integers and so their floor (or ceiling) is just the number inside (two integers added or subtracted will always give an integer answer).
If $a$ is even and $b$ is odd, then we have $a=2m$ and $b=2n+1$, again for $m$ and $n$ integers.
So we have beginalignleftlfloorfraca-b2rightrfloor+leftlceilfraca+b2rightrceil &= leftlfloorfrac(2m)-(2n+1)2rightrfloor+ leftlceilfrac(2m)+(2n+1)2rightrceil\
&=leftlfloorfrac2m-2n-12rightrfloor+ leftlceilfrac2m+2n+12rightrceil\
&=leftlfloor m-n-frac 12rightrfloor + leftlceil m+n+frac12rightrceil\
&= m-n -1+ m+n+1tag$dagger$\
&= 2m\
&=aendalign
Here we get to $(dagger)$ because we round the first half down and the second half up to their respective nearest integers
answered Jan 25 at 13:03
lioness99alioness99a
3,7492727
3,7492727
add a comment |
add a comment |
$begingroup$
As $s:=a+b$ and $a-b$ have the same parity, we can write
$$leftlfloorfracs-2b2rightrfloor+leftlceilfrac s2rightrceil=leftlfloorfrac s2rightrfloor+leftlceilfrac s2rightrceil-b=s-b=a.$$
$endgroup$
add a comment |
$begingroup$
As $s:=a+b$ and $a-b$ have the same parity, we can write
$$leftlfloorfracs-2b2rightrfloor+leftlceilfrac s2rightrceil=leftlfloorfrac s2rightrfloor+leftlceilfrac s2rightrceil-b=s-b=a.$$
$endgroup$
add a comment |
$begingroup$
As $s:=a+b$ and $a-b$ have the same parity, we can write
$$leftlfloorfracs-2b2rightrfloor+leftlceilfrac s2rightrceil=leftlfloorfrac s2rightrfloor+leftlceilfrac s2rightrceil-b=s-b=a.$$
$endgroup$
As $s:=a+b$ and $a-b$ have the same parity, we can write
$$leftlfloorfracs-2b2rightrfloor+leftlceilfrac s2rightrceil=leftlfloorfrac s2rightrfloor+leftlceilfrac s2rightrceil-b=s-b=a.$$
answered Jan 25 at 13:15
Yves DaoustYves Daoust
128k673226
128k673226
add a comment |
add a comment |
$begingroup$
Write $b$ as $2k + 1$, where $k$ is a nonnegative integer. Then look at two cases: $a = 2s$ ($s$ a positive integer), and $a = 2s + 1$ ($s$ a nonnegative integer). What do you get for the left-hand side in each case? [You can show your work by clicking "edit" beneath your question.]
$endgroup$
– John Hughes
Jan 25 at 12:58
1
$begingroup$
@JohnHughes why are you presuming the existence of work? Perhaps they have no work and no idea, and to now do work and retroactively add it to the question would be the equivalent of answering it, so they shouldn't edit to add new work that wasn't done before originally asking.
$endgroup$
– The Great Duck
Jan 26 at 1:32
$begingroup$
You might notice that my comment appeared a few minutes after the question was asked, and before lots of other folks posted answers. Either way, I generally like to lead people in the direction of answering their own questions when I can (esp. when they look to me like homework questions).
$endgroup$
– John Hughes
Jan 26 at 3:23