About the location of natural numbers
$begingroup$
My question is concerned on the location of natural numbers:
Find sufficient and necessary conditions on two real numbers $a$ and $b$ such that the open interval $(a,b)$ contain at least one natural number $q$.
real-analysis real-numbers
$endgroup$
add a comment |
$begingroup$
My question is concerned on the location of natural numbers:
Find sufficient and necessary conditions on two real numbers $a$ and $b$ such that the open interval $(a,b)$ contain at least one natural number $q$.
real-analysis real-numbers
$endgroup$
9
$begingroup$
I can't imagine a condition that would be simpler than "there is an integer in $(a,b)$". One could invent more complicated conditions (as in Christian Blatter's answer) but what would be the point? Is there a particular kind of condition you are looking for?
$endgroup$
– Nate Eldredge
Nov 5 '14 at 15:53
1
$begingroup$
Are you sure you mean natural numbers?
$endgroup$
– imallett
Nov 5 '14 at 23:53
$begingroup$
@GraphicsResearch: Yes, I mean that.
$endgroup$
– DER
Nov 6 '14 at 6:10
1
$begingroup$
@DER . . . are you sure? Not, for example, the integers? The answers below, including the one you've accepted, do not hold for N, although they do hold for Z.
$endgroup$
– imallett
Nov 6 '14 at 6:12
add a comment |
$begingroup$
My question is concerned on the location of natural numbers:
Find sufficient and necessary conditions on two real numbers $a$ and $b$ such that the open interval $(a,b)$ contain at least one natural number $q$.
real-analysis real-numbers
$endgroup$
My question is concerned on the location of natural numbers:
Find sufficient and necessary conditions on two real numbers $a$ and $b$ such that the open interval $(a,b)$ contain at least one natural number $q$.
real-analysis real-numbers
real-analysis real-numbers
edited Nov 12 '14 at 15:51
DER
asked Nov 5 '14 at 14:59
DERDER
1,6631018
1,6631018
9
$begingroup$
I can't imagine a condition that would be simpler than "there is an integer in $(a,b)$". One could invent more complicated conditions (as in Christian Blatter's answer) but what would be the point? Is there a particular kind of condition you are looking for?
$endgroup$
– Nate Eldredge
Nov 5 '14 at 15:53
1
$begingroup$
Are you sure you mean natural numbers?
$endgroup$
– imallett
Nov 5 '14 at 23:53
$begingroup$
@GraphicsResearch: Yes, I mean that.
$endgroup$
– DER
Nov 6 '14 at 6:10
1
$begingroup$
@DER . . . are you sure? Not, for example, the integers? The answers below, including the one you've accepted, do not hold for N, although they do hold for Z.
$endgroup$
– imallett
Nov 6 '14 at 6:12
add a comment |
9
$begingroup$
I can't imagine a condition that would be simpler than "there is an integer in $(a,b)$". One could invent more complicated conditions (as in Christian Blatter's answer) but what would be the point? Is there a particular kind of condition you are looking for?
$endgroup$
– Nate Eldredge
Nov 5 '14 at 15:53
1
$begingroup$
Are you sure you mean natural numbers?
$endgroup$
– imallett
Nov 5 '14 at 23:53
$begingroup$
@GraphicsResearch: Yes, I mean that.
$endgroup$
– DER
Nov 6 '14 at 6:10
1
$begingroup$
@DER . . . are you sure? Not, for example, the integers? The answers below, including the one you've accepted, do not hold for N, although they do hold for Z.
$endgroup$
– imallett
Nov 6 '14 at 6:12
9
9
$begingroup$
I can't imagine a condition that would be simpler than "there is an integer in $(a,b)$". One could invent more complicated conditions (as in Christian Blatter's answer) but what would be the point? Is there a particular kind of condition you are looking for?
$endgroup$
– Nate Eldredge
Nov 5 '14 at 15:53
$begingroup$
I can't imagine a condition that would be simpler than "there is an integer in $(a,b)$". One could invent more complicated conditions (as in Christian Blatter's answer) but what would be the point? Is there a particular kind of condition you are looking for?
$endgroup$
– Nate Eldredge
Nov 5 '14 at 15:53
1
1
$begingroup$
Are you sure you mean natural numbers?
$endgroup$
– imallett
Nov 5 '14 at 23:53
$begingroup$
Are you sure you mean natural numbers?
$endgroup$
– imallett
Nov 5 '14 at 23:53
$begingroup$
@GraphicsResearch: Yes, I mean that.
$endgroup$
– DER
Nov 6 '14 at 6:10
$begingroup$
@GraphicsResearch: Yes, I mean that.
$endgroup$
– DER
Nov 6 '14 at 6:10
1
1
$begingroup$
@DER . . . are you sure? Not, for example, the integers? The answers below, including the one you've accepted, do not hold for N, although they do hold for Z.
$endgroup$
– imallett
Nov 6 '14 at 6:12
$begingroup$
@DER . . . are you sure? Not, for example, the integers? The answers below, including the one you've accepted, do not hold for N, although they do hold for Z.
$endgroup$
– imallett
Nov 6 '14 at 6:12
add a comment |
4 Answers
4
active
oldest
votes
$begingroup$
$lceil brceil - lfloor arfloor >1$ is necessary and sufficient for (aka. equivalent to) the existence of an integer in $(a,b)$.
$endgroup$
1
$begingroup$
An alternative formulation, not using the tacit assumption $ale b$, is $left(lceil brceil-lfloor arfloorright)left(lceil arceil-lfloor brfloorright)not=1$
$endgroup$
– Barry Cipra
Nov 5 '14 at 16:37
1
$begingroup$
@Barry: edge case fails, when $a = b$ is an integer, in which case both brackets are $0$ but $(a, b)$ is empty and in particular doesn't contain an integer :-)
$endgroup$
– Steve Jessop
Nov 5 '14 at 17:37
$begingroup$
@SteveJessop, ah, you're quite right!
$endgroup$
– Barry Cipra
Nov 5 '14 at 17:41
$begingroup$
It's not necessary, right? $(1 - 1/3, 1 + 1/3)$ contains an integer.
$endgroup$
– user4894
Nov 6 '14 at 4:33
$begingroup$
@user4894: $lceil1+1/3rceil-lfloor1-1/3rfloor=2-0>1.$
$endgroup$
– Cameron Buie
Nov 12 '14 at 15:52
add a comment |
$begingroup$
I believe that it is sufficient to show that $|a-b|>1$, then there must be some integer $q in (a,b)$.
I guess we could say that a necessary condition would be that the floors of the decimal representation of $a$ and $b$ must be different (i.e. $|lfloor arfloor-lfloor brfloor|neq0$), but that seems rather unsatisfying.
$endgroup$
4
$begingroup$
That isn't necessary though, e.g. (0.9,1.1)
$endgroup$
– David B.
Nov 5 '14 at 15:02
$begingroup$
@DavidBuiles right you are. Corrected.
$endgroup$
– Mike Pierce
Nov 5 '14 at 15:04
1
$begingroup$
The fact that you used the word "must" as you did already indicated that it was a sufficient condition.
$endgroup$
– Cameron Buie
Nov 5 '14 at 15:05
1
$begingroup$
I think (11,21) is a counterexample to the second criterion :)
$endgroup$
– David B.
Nov 5 '14 at 15:12
1
$begingroup$
@DavidBuiles, the open interval $(0,1)$ contains no integer, yet the endpoints have different floors, so that condition alone is not sufficient.
$endgroup$
– Barry Cipra
Nov 5 '14 at 15:22
|
show 4 more comments
$begingroup$
Think of some examples of intervals $(a,b)$ that don't contain any integers. What do the lengths of those intervals have in common? Play around with interval lengths to get a sufficient condition.
As for necessary conditions, what do we have to know about $a$ and $b$ in order for $(a,b)$ to have any elements? I'm not sure that there are any other necessary conditions than that, though.
First Edit: As one can see from Hagen's answer (and from an easy adaptation of Christian's answer, using the necessary condition that I hinted at), there are, in fact, conditions we can provide that are both necessary and sufficient. I will leave my answer here, as it is useful, I think, but please do not upvote it further, or accept it.
Second Edit: For some reason, Christian decided to delete his answer, rather than fix it, so I will provide a repaired version of it here.
Given $a,binBbb R,$ the real interval $(a,b)$ contains an integer if and only if $a<b$ (this is the necessary condition I was hinting at above) and at least one of the following conditions holds:
$|b-a|>1$ (this is the sufficient condition I was hinting at above), or
$sin(pi a)sin(pi b)<0$ (this comes from Christian's now-deleted answer).
Third (and Final?) Edit: Let me outline a proof of the claim I made in my second edit.
We'll need to assume (or be able to prove) the following basic facts about the sine function:
$xmapstosin(x)$ is a periodic function with fundamental period $2pi$
- $sin(0)=0$
$sin(x)>0$ whenever $0<x<pi$
$sin(x)<0$ whenever $-pi<x<0$
Using these four facts, we can prove
Lemma 1: $sin(x)=0$ if and only if $x=npi$ for some integer $n.$ $Box$
Lemma 2: $sin(x)>0$ if and only if $npi<x<(n+1)pi$ for some even integer $n.$ $Box$
Lemma 3: $sin(x)<0$ if and only if $npi<x<(n+1)pi$ for some odd integer $n.$ $Box$
From these Lemmas, it immediately follows that
Corollary 1: $sin(pi x)=0$ if and only if $x$ is an integer. $Box$
Corollary 2: $sin(pi x)>0$ if and only if $n<x<n+1$ for some even integer $n.$ $Box$
Corollary 3: $sin(pi x)<0$ if and only if $n<x<n+1$ for some odd integer $n.$ $Box$
Putting Corollaries $1$ through $3$ together, we can show that
Proposition 1: Given $a,binBbb R$ with $a<b,$ the following are equivalent:
- $sin(pi a)sin(pi b)<0$
$anotinBbb Z,$ $bnotinBbb Z,$ and $bigl|(a,b)capBbb Zbigr|=2k+1$ for some nonnegative integer $k.$ $Box$
Proposition 2: Given $a,binBbb R$ with $a<b,$ the following are equivalent:
- $sin(pi a)sin(pi b)=0$
$ainBbb Z$ or $binBbb Z.$ $Box$
Proposition 3: Given $a,binBbb R$ with $a<b,$ the following are equivalent:
- $sin(pi a)sin(pi b)>0$
$anotinBbb Z,$ $bnotinBbb Z,$ and $bigl|(a,b)capBbb Zbigr|=2k$ for some nonnegative integer $k.$ $Box$
Now, to bring (most of) it home!
Theorem 1: Suppose that $a,binBbb R.$ Then there is an integer in $(a,b)$ if and only if both of the following hold:
$a<b$ and
$|b-a|>1$ or $sin(pi a)sin(pi b)<0.$
Proof: First, let's suppose that there is an integer in $(a,b),$ meaning that $(a,b)capBbb Zneqemptyset.$ Consequently, $(a,b)neqemptyset,$ and so $a<b,$ as desired. Suppose that $m,nin(a,b)capBbb Z,$ with $mle n.$ Since $a<m,$ then $-m+a<0,$ so $-m<-a,$ and consequently, $$b-m<b-a.tag{1}$$ Furthermore, $n<b,$ so $$n-m<b-m.tag{2}$$ By $(1)$ and $(2),$ since $mle n,$ then $$lvert n-mrvert=n-m<b-m<b-a.tag{3}$$ As $m,n$ are arbitrary elements of $(a,b)capBbb Z,$ then the distance between elements of $(a,b)capBbb Z$ is necessarily finite, and so $(a,b)capBbb Z$ is a finite set, so has either an odd number of elements or an even number of elements. If it has an odd number of elements, then by Proposition 1, we have $sin(pi a)sin(pi b)<0.$ On the other hand, if it has an even number of elements, then there exist distinct elements $m,n,$ and so by $(3),$ we have $1le|n-m|<b-ale|b-a|,$ as desired.
For the other implication, we proceed by way of the contrapositive, and assume that condition 1 fails or condition 2 fails. We show that $(a,b)capBbb Z=emptyset.$ If condition 1 fails, then $(a,b)=emptyset,$ so $(a,b)capBbb Z=emptyset,$ as desired. Suppose instead that condition 2 fails, meaning that $|b-a|le 1$ and $sin(pi a)sin(pi b)ge 0.$ In the case $sin(pi a)sin(pi b)=0,$ we have by Proposition 2 that at least one of $a,b$ is an integer, and since the other is within $1$ of it, then there can be no integer in the interval, meaning $(a,b)capBbb Z=emptyset,$ as desired. On the other hand, let's suppose that $sin(pi a)sin(pi b)>0,$ so that by Proposition 3, $(a,b)capBbb Z$ has $2k$ elements for some non-negative integer $k.$ However, by reasoning as we did in $(1)$ through $(3)$ above, we find that the distance between elements of $(a,b)$ must be less than $1,$ while distinct integers are at least $1$ away from each other, so $(a,b)capBbb Z$ cannot have distinct elements. Hence, $k$ cannot be positive, and so $(a,b)capBbb Z=emptyset,$ as desired. $Box$
However, you weren't asking about integers, but about natural numbers--which for you means positive integers. Consequently, you'd want the following
Corollary 4: Suppose that $a,binBbb R.$ Then there is a natural number in $(a,b)$ if and only if all of the following hold:
$b>1,$
$a<b,$ and
$|b-a|>1$ or $sin(pi a)sin(pi b)<0.$ $Box$
Alternatively, expanding on Hagen's answer, we have:
Theorem 2: Suppose that $a,binBbb R.$ Then there is a natural number in $(a,b)$ if and only if both of the following hold:
$b>1$ and
$lceil brceil-lfloor arfloor>1.$
Proof: Suppose there is a natural number in $(a,b),$ say $n.$ Since $1le n<b,$ then 1 holds. Since $lfloor arfloor$ is an integer with $lfloor arfloorle a<n,$ then $n-lfloor arfloorge1.$ Since $lceil brceil$ is an integer with $n<blelceil brceil,$ then $lceil brceil-nge1,$ so $$lceil brceil-lfloor arfloor=lceil brceil-n+n-lfloor arfloorge1+n-lfloor arfloorge2>1,$$ so 2 holds.
For the other implication, suppose that $b>1$ and $lceil brceil-lfloor arfloor>1.$ By definition, both $lceil brceil$ and $lfloor arfloor$ are integers, so from $lceil brceil-lfloor arfloor>1$ we have that $$lceil brceil-lfloor arfloorge2,$$ $$lfloor arfloor+2lelceil brceil,$$ and so $$lfloor arfloor-1<lfloor arfloor<lfloor arfloor+1lelceil brceil-1.tag{1}$$ Since $lfloor arfloorle a<lfloor arfloor+1,$ then by $(1),$ we have $$a<lceil brceil-1.tag{2}$$ Similarly, $lceil brceil-1<blelceil brceil,$ so we have by $(2)$ that $a<lceil brceil-1<b,$ and so $$lceil brceil-1in(a,b)capBbb Z.tag{3}$$ Now, given any integer $n,$ we have $n<b$ if and only if $n<lfloor brfloor.$ In particular, since $b>1,$ then $1<lfloor brfloor,$ and since $lfloor brfloor$ is an integer, then $$2lelfloor brfloorle blelceil brceil,$$ and so $$1lelceil brceil-1.tag{4}$$ By $(3)$ and $(4),$ we have $$lceil brceil-1in(a,b)capBbb N,$$ as desired. $Box$
$endgroup$
$begingroup$
@ Cameron Buie: This is a nice answer. Can you give a simple proof of that.
$endgroup$
– DER
Nov 12 '14 at 15:20
$begingroup$
Of which part(s)?
$endgroup$
– Cameron Buie
Nov 12 '14 at 15:37
$begingroup$
@ Cameron Buie: In the Second Edit.
$endgroup$
– DER
Nov 12 '14 at 15:39
$begingroup$
I'll see what I can do. Incidentally, do you actually mean "natural numbers" in your post, or do you mean "integers," instead. I was assuming the latter. If it is the former, then I will need your definition of natural number, and I will need to alter my answer.
$endgroup$
– Cameron Buie
Nov 12 '14 at 15:41
$begingroup$
@ Cameron Buie: I mean natural numbers. They are positive integers.
$endgroup$
– DER
Nov 12 '14 at 15:50
|
show 1 more comment
$begingroup$
This is a little exegesis on Hagen von Eitzen's wonderfully simple answer, $lceil brceil-lfloor arfloorgt1$ as a necessary and sufficient condition for there to be an integer in the open interval with endpoints $a$ and $b$.
The one drawback to this formula is that it relies on the tacit assumption $ale b$. In comments below Hagen's answer I proposed a formula that was agnostic on the issue of which was bigger, but the formula I gave fails rather badly, so I'd just as soon no one look it.
One can, of course, replace $a$ and $b$ with $min(a,b)$ and $max(a,b)$ in Hagen's formula. In fact, playing with the identities $lceil xrceil=-lfloor -xrfloor$ and $max(a,b)=-min(-a,-b)$, one can write the condition as
$$lfloormin(a,b)rfloor+lfloormin(-a,-b)rfloorlt-1$$
But it'd be nice, I thought, not to use the comparison function(s), and give a necessary and sufficient condition strictly in terms of arithmetic operations and the floor (and ceiling) function. So here's one which, unlike my first proposal, actually works:
$$left(lfloor arfloor-lfloor brfloor right)left(lceil arceil-lceil brceil right)left(left(a-lfloor arfloor right)^2+left(b-lfloor brfloor right)^2+left((a-b)^2-1 right)^2 right)not=0$$
That is, the only way there is no integer between $a$ and $b$ is if $a,bin[k,k+1]$ for some integer $k$, in which case either $a$ and $b$ both round down to $k$, or both round up to $k+1$, or else one is $k$ and the other is $k+1$, which is to say, they are both integers and they differ by $1$. The three factors on the left hand side correspond to these three possibilities.
The obvious drawback here is the formula's ungainliness. But I'm hard pressed to think of anything substantially simpler. I'd be happy to see a gainlier one.
$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%2f1007461%2fabout-the-location-of-natural-numbers%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
$lceil brceil - lfloor arfloor >1$ is necessary and sufficient for (aka. equivalent to) the existence of an integer in $(a,b)$.
$endgroup$
1
$begingroup$
An alternative formulation, not using the tacit assumption $ale b$, is $left(lceil brceil-lfloor arfloorright)left(lceil arceil-lfloor brfloorright)not=1$
$endgroup$
– Barry Cipra
Nov 5 '14 at 16:37
1
$begingroup$
@Barry: edge case fails, when $a = b$ is an integer, in which case both brackets are $0$ but $(a, b)$ is empty and in particular doesn't contain an integer :-)
$endgroup$
– Steve Jessop
Nov 5 '14 at 17:37
$begingroup$
@SteveJessop, ah, you're quite right!
$endgroup$
– Barry Cipra
Nov 5 '14 at 17:41
$begingroup$
It's not necessary, right? $(1 - 1/3, 1 + 1/3)$ contains an integer.
$endgroup$
– user4894
Nov 6 '14 at 4:33
$begingroup$
@user4894: $lceil1+1/3rceil-lfloor1-1/3rfloor=2-0>1.$
$endgroup$
– Cameron Buie
Nov 12 '14 at 15:52
add a comment |
$begingroup$
$lceil brceil - lfloor arfloor >1$ is necessary and sufficient for (aka. equivalent to) the existence of an integer in $(a,b)$.
$endgroup$
1
$begingroup$
An alternative formulation, not using the tacit assumption $ale b$, is $left(lceil brceil-lfloor arfloorright)left(lceil arceil-lfloor brfloorright)not=1$
$endgroup$
– Barry Cipra
Nov 5 '14 at 16:37
1
$begingroup$
@Barry: edge case fails, when $a = b$ is an integer, in which case both brackets are $0$ but $(a, b)$ is empty and in particular doesn't contain an integer :-)
$endgroup$
– Steve Jessop
Nov 5 '14 at 17:37
$begingroup$
@SteveJessop, ah, you're quite right!
$endgroup$
– Barry Cipra
Nov 5 '14 at 17:41
$begingroup$
It's not necessary, right? $(1 - 1/3, 1 + 1/3)$ contains an integer.
$endgroup$
– user4894
Nov 6 '14 at 4:33
$begingroup$
@user4894: $lceil1+1/3rceil-lfloor1-1/3rfloor=2-0>1.$
$endgroup$
– Cameron Buie
Nov 12 '14 at 15:52
add a comment |
$begingroup$
$lceil brceil - lfloor arfloor >1$ is necessary and sufficient for (aka. equivalent to) the existence of an integer in $(a,b)$.
$endgroup$
$lceil brceil - lfloor arfloor >1$ is necessary and sufficient for (aka. equivalent to) the existence of an integer in $(a,b)$.
answered Nov 5 '14 at 15:54
Hagen von EitzenHagen von Eitzen
282k23272507
282k23272507
1
$begingroup$
An alternative formulation, not using the tacit assumption $ale b$, is $left(lceil brceil-lfloor arfloorright)left(lceil arceil-lfloor brfloorright)not=1$
$endgroup$
– Barry Cipra
Nov 5 '14 at 16:37
1
$begingroup$
@Barry: edge case fails, when $a = b$ is an integer, in which case both brackets are $0$ but $(a, b)$ is empty and in particular doesn't contain an integer :-)
$endgroup$
– Steve Jessop
Nov 5 '14 at 17:37
$begingroup$
@SteveJessop, ah, you're quite right!
$endgroup$
– Barry Cipra
Nov 5 '14 at 17:41
$begingroup$
It's not necessary, right? $(1 - 1/3, 1 + 1/3)$ contains an integer.
$endgroup$
– user4894
Nov 6 '14 at 4:33
$begingroup$
@user4894: $lceil1+1/3rceil-lfloor1-1/3rfloor=2-0>1.$
$endgroup$
– Cameron Buie
Nov 12 '14 at 15:52
add a comment |
1
$begingroup$
An alternative formulation, not using the tacit assumption $ale b$, is $left(lceil brceil-lfloor arfloorright)left(lceil arceil-lfloor brfloorright)not=1$
$endgroup$
– Barry Cipra
Nov 5 '14 at 16:37
1
$begingroup$
@Barry: edge case fails, when $a = b$ is an integer, in which case both brackets are $0$ but $(a, b)$ is empty and in particular doesn't contain an integer :-)
$endgroup$
– Steve Jessop
Nov 5 '14 at 17:37
$begingroup$
@SteveJessop, ah, you're quite right!
$endgroup$
– Barry Cipra
Nov 5 '14 at 17:41
$begingroup$
It's not necessary, right? $(1 - 1/3, 1 + 1/3)$ contains an integer.
$endgroup$
– user4894
Nov 6 '14 at 4:33
$begingroup$
@user4894: $lceil1+1/3rceil-lfloor1-1/3rfloor=2-0>1.$
$endgroup$
– Cameron Buie
Nov 12 '14 at 15:52
1
1
$begingroup$
An alternative formulation, not using the tacit assumption $ale b$, is $left(lceil brceil-lfloor arfloorright)left(lceil arceil-lfloor brfloorright)not=1$
$endgroup$
– Barry Cipra
Nov 5 '14 at 16:37
$begingroup$
An alternative formulation, not using the tacit assumption $ale b$, is $left(lceil brceil-lfloor arfloorright)left(lceil arceil-lfloor brfloorright)not=1$
$endgroup$
– Barry Cipra
Nov 5 '14 at 16:37
1
1
$begingroup$
@Barry: edge case fails, when $a = b$ is an integer, in which case both brackets are $0$ but $(a, b)$ is empty and in particular doesn't contain an integer :-)
$endgroup$
– Steve Jessop
Nov 5 '14 at 17:37
$begingroup$
@Barry: edge case fails, when $a = b$ is an integer, in which case both brackets are $0$ but $(a, b)$ is empty and in particular doesn't contain an integer :-)
$endgroup$
– Steve Jessop
Nov 5 '14 at 17:37
$begingroup$
@SteveJessop, ah, you're quite right!
$endgroup$
– Barry Cipra
Nov 5 '14 at 17:41
$begingroup$
@SteveJessop, ah, you're quite right!
$endgroup$
– Barry Cipra
Nov 5 '14 at 17:41
$begingroup$
It's not necessary, right? $(1 - 1/3, 1 + 1/3)$ contains an integer.
$endgroup$
– user4894
Nov 6 '14 at 4:33
$begingroup$
It's not necessary, right? $(1 - 1/3, 1 + 1/3)$ contains an integer.
$endgroup$
– user4894
Nov 6 '14 at 4:33
$begingroup$
@user4894: $lceil1+1/3rceil-lfloor1-1/3rfloor=2-0>1.$
$endgroup$
– Cameron Buie
Nov 12 '14 at 15:52
$begingroup$
@user4894: $lceil1+1/3rceil-lfloor1-1/3rfloor=2-0>1.$
$endgroup$
– Cameron Buie
Nov 12 '14 at 15:52
add a comment |
$begingroup$
I believe that it is sufficient to show that $|a-b|>1$, then there must be some integer $q in (a,b)$.
I guess we could say that a necessary condition would be that the floors of the decimal representation of $a$ and $b$ must be different (i.e. $|lfloor arfloor-lfloor brfloor|neq0$), but that seems rather unsatisfying.
$endgroup$
4
$begingroup$
That isn't necessary though, e.g. (0.9,1.1)
$endgroup$
– David B.
Nov 5 '14 at 15:02
$begingroup$
@DavidBuiles right you are. Corrected.
$endgroup$
– Mike Pierce
Nov 5 '14 at 15:04
1
$begingroup$
The fact that you used the word "must" as you did already indicated that it was a sufficient condition.
$endgroup$
– Cameron Buie
Nov 5 '14 at 15:05
1
$begingroup$
I think (11,21) is a counterexample to the second criterion :)
$endgroup$
– David B.
Nov 5 '14 at 15:12
1
$begingroup$
@DavidBuiles, the open interval $(0,1)$ contains no integer, yet the endpoints have different floors, so that condition alone is not sufficient.
$endgroup$
– Barry Cipra
Nov 5 '14 at 15:22
|
show 4 more comments
$begingroup$
I believe that it is sufficient to show that $|a-b|>1$, then there must be some integer $q in (a,b)$.
I guess we could say that a necessary condition would be that the floors of the decimal representation of $a$ and $b$ must be different (i.e. $|lfloor arfloor-lfloor brfloor|neq0$), but that seems rather unsatisfying.
$endgroup$
4
$begingroup$
That isn't necessary though, e.g. (0.9,1.1)
$endgroup$
– David B.
Nov 5 '14 at 15:02
$begingroup$
@DavidBuiles right you are. Corrected.
$endgroup$
– Mike Pierce
Nov 5 '14 at 15:04
1
$begingroup$
The fact that you used the word "must" as you did already indicated that it was a sufficient condition.
$endgroup$
– Cameron Buie
Nov 5 '14 at 15:05
1
$begingroup$
I think (11,21) is a counterexample to the second criterion :)
$endgroup$
– David B.
Nov 5 '14 at 15:12
1
$begingroup$
@DavidBuiles, the open interval $(0,1)$ contains no integer, yet the endpoints have different floors, so that condition alone is not sufficient.
$endgroup$
– Barry Cipra
Nov 5 '14 at 15:22
|
show 4 more comments
$begingroup$
I believe that it is sufficient to show that $|a-b|>1$, then there must be some integer $q in (a,b)$.
I guess we could say that a necessary condition would be that the floors of the decimal representation of $a$ and $b$ must be different (i.e. $|lfloor arfloor-lfloor brfloor|neq0$), but that seems rather unsatisfying.
$endgroup$
I believe that it is sufficient to show that $|a-b|>1$, then there must be some integer $q in (a,b)$.
I guess we could say that a necessary condition would be that the floors of the decimal representation of $a$ and $b$ must be different (i.e. $|lfloor arfloor-lfloor brfloor|neq0$), but that seems rather unsatisfying.
edited Nov 6 '14 at 4:28
answered Nov 5 '14 at 15:01
Mike PierceMike Pierce
11.6k103584
11.6k103584
4
$begingroup$
That isn't necessary though, e.g. (0.9,1.1)
$endgroup$
– David B.
Nov 5 '14 at 15:02
$begingroup$
@DavidBuiles right you are. Corrected.
$endgroup$
– Mike Pierce
Nov 5 '14 at 15:04
1
$begingroup$
The fact that you used the word "must" as you did already indicated that it was a sufficient condition.
$endgroup$
– Cameron Buie
Nov 5 '14 at 15:05
1
$begingroup$
I think (11,21) is a counterexample to the second criterion :)
$endgroup$
– David B.
Nov 5 '14 at 15:12
1
$begingroup$
@DavidBuiles, the open interval $(0,1)$ contains no integer, yet the endpoints have different floors, so that condition alone is not sufficient.
$endgroup$
– Barry Cipra
Nov 5 '14 at 15:22
|
show 4 more comments
4
$begingroup$
That isn't necessary though, e.g. (0.9,1.1)
$endgroup$
– David B.
Nov 5 '14 at 15:02
$begingroup$
@DavidBuiles right you are. Corrected.
$endgroup$
– Mike Pierce
Nov 5 '14 at 15:04
1
$begingroup$
The fact that you used the word "must" as you did already indicated that it was a sufficient condition.
$endgroup$
– Cameron Buie
Nov 5 '14 at 15:05
1
$begingroup$
I think (11,21) is a counterexample to the second criterion :)
$endgroup$
– David B.
Nov 5 '14 at 15:12
1
$begingroup$
@DavidBuiles, the open interval $(0,1)$ contains no integer, yet the endpoints have different floors, so that condition alone is not sufficient.
$endgroup$
– Barry Cipra
Nov 5 '14 at 15:22
4
4
$begingroup$
That isn't necessary though, e.g. (0.9,1.1)
$endgroup$
– David B.
Nov 5 '14 at 15:02
$begingroup$
That isn't necessary though, e.g. (0.9,1.1)
$endgroup$
– David B.
Nov 5 '14 at 15:02
$begingroup$
@DavidBuiles right you are. Corrected.
$endgroup$
– Mike Pierce
Nov 5 '14 at 15:04
$begingroup$
@DavidBuiles right you are. Corrected.
$endgroup$
– Mike Pierce
Nov 5 '14 at 15:04
1
1
$begingroup$
The fact that you used the word "must" as you did already indicated that it was a sufficient condition.
$endgroup$
– Cameron Buie
Nov 5 '14 at 15:05
$begingroup$
The fact that you used the word "must" as you did already indicated that it was a sufficient condition.
$endgroup$
– Cameron Buie
Nov 5 '14 at 15:05
1
1
$begingroup$
I think (11,21) is a counterexample to the second criterion :)
$endgroup$
– David B.
Nov 5 '14 at 15:12
$begingroup$
I think (11,21) is a counterexample to the second criterion :)
$endgroup$
– David B.
Nov 5 '14 at 15:12
1
1
$begingroup$
@DavidBuiles, the open interval $(0,1)$ contains no integer, yet the endpoints have different floors, so that condition alone is not sufficient.
$endgroup$
– Barry Cipra
Nov 5 '14 at 15:22
$begingroup$
@DavidBuiles, the open interval $(0,1)$ contains no integer, yet the endpoints have different floors, so that condition alone is not sufficient.
$endgroup$
– Barry Cipra
Nov 5 '14 at 15:22
|
show 4 more comments
$begingroup$
Think of some examples of intervals $(a,b)$ that don't contain any integers. What do the lengths of those intervals have in common? Play around with interval lengths to get a sufficient condition.
As for necessary conditions, what do we have to know about $a$ and $b$ in order for $(a,b)$ to have any elements? I'm not sure that there are any other necessary conditions than that, though.
First Edit: As one can see from Hagen's answer (and from an easy adaptation of Christian's answer, using the necessary condition that I hinted at), there are, in fact, conditions we can provide that are both necessary and sufficient. I will leave my answer here, as it is useful, I think, but please do not upvote it further, or accept it.
Second Edit: For some reason, Christian decided to delete his answer, rather than fix it, so I will provide a repaired version of it here.
Given $a,binBbb R,$ the real interval $(a,b)$ contains an integer if and only if $a<b$ (this is the necessary condition I was hinting at above) and at least one of the following conditions holds:
$|b-a|>1$ (this is the sufficient condition I was hinting at above), or
$sin(pi a)sin(pi b)<0$ (this comes from Christian's now-deleted answer).
Third (and Final?) Edit: Let me outline a proof of the claim I made in my second edit.
We'll need to assume (or be able to prove) the following basic facts about the sine function:
$xmapstosin(x)$ is a periodic function with fundamental period $2pi$
- $sin(0)=0$
$sin(x)>0$ whenever $0<x<pi$
$sin(x)<0$ whenever $-pi<x<0$
Using these four facts, we can prove
Lemma 1: $sin(x)=0$ if and only if $x=npi$ for some integer $n.$ $Box$
Lemma 2: $sin(x)>0$ if and only if $npi<x<(n+1)pi$ for some even integer $n.$ $Box$
Lemma 3: $sin(x)<0$ if and only if $npi<x<(n+1)pi$ for some odd integer $n.$ $Box$
From these Lemmas, it immediately follows that
Corollary 1: $sin(pi x)=0$ if and only if $x$ is an integer. $Box$
Corollary 2: $sin(pi x)>0$ if and only if $n<x<n+1$ for some even integer $n.$ $Box$
Corollary 3: $sin(pi x)<0$ if and only if $n<x<n+1$ for some odd integer $n.$ $Box$
Putting Corollaries $1$ through $3$ together, we can show that
Proposition 1: Given $a,binBbb R$ with $a<b,$ the following are equivalent:
- $sin(pi a)sin(pi b)<0$
$anotinBbb Z,$ $bnotinBbb Z,$ and $bigl|(a,b)capBbb Zbigr|=2k+1$ for some nonnegative integer $k.$ $Box$
Proposition 2: Given $a,binBbb R$ with $a<b,$ the following are equivalent:
- $sin(pi a)sin(pi b)=0$
$ainBbb Z$ or $binBbb Z.$ $Box$
Proposition 3: Given $a,binBbb R$ with $a<b,$ the following are equivalent:
- $sin(pi a)sin(pi b)>0$
$anotinBbb Z,$ $bnotinBbb Z,$ and $bigl|(a,b)capBbb Zbigr|=2k$ for some nonnegative integer $k.$ $Box$
Now, to bring (most of) it home!
Theorem 1: Suppose that $a,binBbb R.$ Then there is an integer in $(a,b)$ if and only if both of the following hold:
$a<b$ and
$|b-a|>1$ or $sin(pi a)sin(pi b)<0.$
Proof: First, let's suppose that there is an integer in $(a,b),$ meaning that $(a,b)capBbb Zneqemptyset.$ Consequently, $(a,b)neqemptyset,$ and so $a<b,$ as desired. Suppose that $m,nin(a,b)capBbb Z,$ with $mle n.$ Since $a<m,$ then $-m+a<0,$ so $-m<-a,$ and consequently, $$b-m<b-a.tag{1}$$ Furthermore, $n<b,$ so $$n-m<b-m.tag{2}$$ By $(1)$ and $(2),$ since $mle n,$ then $$lvert n-mrvert=n-m<b-m<b-a.tag{3}$$ As $m,n$ are arbitrary elements of $(a,b)capBbb Z,$ then the distance between elements of $(a,b)capBbb Z$ is necessarily finite, and so $(a,b)capBbb Z$ is a finite set, so has either an odd number of elements or an even number of elements. If it has an odd number of elements, then by Proposition 1, we have $sin(pi a)sin(pi b)<0.$ On the other hand, if it has an even number of elements, then there exist distinct elements $m,n,$ and so by $(3),$ we have $1le|n-m|<b-ale|b-a|,$ as desired.
For the other implication, we proceed by way of the contrapositive, and assume that condition 1 fails or condition 2 fails. We show that $(a,b)capBbb Z=emptyset.$ If condition 1 fails, then $(a,b)=emptyset,$ so $(a,b)capBbb Z=emptyset,$ as desired. Suppose instead that condition 2 fails, meaning that $|b-a|le 1$ and $sin(pi a)sin(pi b)ge 0.$ In the case $sin(pi a)sin(pi b)=0,$ we have by Proposition 2 that at least one of $a,b$ is an integer, and since the other is within $1$ of it, then there can be no integer in the interval, meaning $(a,b)capBbb Z=emptyset,$ as desired. On the other hand, let's suppose that $sin(pi a)sin(pi b)>0,$ so that by Proposition 3, $(a,b)capBbb Z$ has $2k$ elements for some non-negative integer $k.$ However, by reasoning as we did in $(1)$ through $(3)$ above, we find that the distance between elements of $(a,b)$ must be less than $1,$ while distinct integers are at least $1$ away from each other, so $(a,b)capBbb Z$ cannot have distinct elements. Hence, $k$ cannot be positive, and so $(a,b)capBbb Z=emptyset,$ as desired. $Box$
However, you weren't asking about integers, but about natural numbers--which for you means positive integers. Consequently, you'd want the following
Corollary 4: Suppose that $a,binBbb R.$ Then there is a natural number in $(a,b)$ if and only if all of the following hold:
$b>1,$
$a<b,$ and
$|b-a|>1$ or $sin(pi a)sin(pi b)<0.$ $Box$
Alternatively, expanding on Hagen's answer, we have:
Theorem 2: Suppose that $a,binBbb R.$ Then there is a natural number in $(a,b)$ if and only if both of the following hold:
$b>1$ and
$lceil brceil-lfloor arfloor>1.$
Proof: Suppose there is a natural number in $(a,b),$ say $n.$ Since $1le n<b,$ then 1 holds. Since $lfloor arfloor$ is an integer with $lfloor arfloorle a<n,$ then $n-lfloor arfloorge1.$ Since $lceil brceil$ is an integer with $n<blelceil brceil,$ then $lceil brceil-nge1,$ so $$lceil brceil-lfloor arfloor=lceil brceil-n+n-lfloor arfloorge1+n-lfloor arfloorge2>1,$$ so 2 holds.
For the other implication, suppose that $b>1$ and $lceil brceil-lfloor arfloor>1.$ By definition, both $lceil brceil$ and $lfloor arfloor$ are integers, so from $lceil brceil-lfloor arfloor>1$ we have that $$lceil brceil-lfloor arfloorge2,$$ $$lfloor arfloor+2lelceil brceil,$$ and so $$lfloor arfloor-1<lfloor arfloor<lfloor arfloor+1lelceil brceil-1.tag{1}$$ Since $lfloor arfloorle a<lfloor arfloor+1,$ then by $(1),$ we have $$a<lceil brceil-1.tag{2}$$ Similarly, $lceil brceil-1<blelceil brceil,$ so we have by $(2)$ that $a<lceil brceil-1<b,$ and so $$lceil brceil-1in(a,b)capBbb Z.tag{3}$$ Now, given any integer $n,$ we have $n<b$ if and only if $n<lfloor brfloor.$ In particular, since $b>1,$ then $1<lfloor brfloor,$ and since $lfloor brfloor$ is an integer, then $$2lelfloor brfloorle blelceil brceil,$$ and so $$1lelceil brceil-1.tag{4}$$ By $(3)$ and $(4),$ we have $$lceil brceil-1in(a,b)capBbb N,$$ as desired. $Box$
$endgroup$
$begingroup$
@ Cameron Buie: This is a nice answer. Can you give a simple proof of that.
$endgroup$
– DER
Nov 12 '14 at 15:20
$begingroup$
Of which part(s)?
$endgroup$
– Cameron Buie
Nov 12 '14 at 15:37
$begingroup$
@ Cameron Buie: In the Second Edit.
$endgroup$
– DER
Nov 12 '14 at 15:39
$begingroup$
I'll see what I can do. Incidentally, do you actually mean "natural numbers" in your post, or do you mean "integers," instead. I was assuming the latter. If it is the former, then I will need your definition of natural number, and I will need to alter my answer.
$endgroup$
– Cameron Buie
Nov 12 '14 at 15:41
$begingroup$
@ Cameron Buie: I mean natural numbers. They are positive integers.
$endgroup$
– DER
Nov 12 '14 at 15:50
|
show 1 more comment
$begingroup$
Think of some examples of intervals $(a,b)$ that don't contain any integers. What do the lengths of those intervals have in common? Play around with interval lengths to get a sufficient condition.
As for necessary conditions, what do we have to know about $a$ and $b$ in order for $(a,b)$ to have any elements? I'm not sure that there are any other necessary conditions than that, though.
First Edit: As one can see from Hagen's answer (and from an easy adaptation of Christian's answer, using the necessary condition that I hinted at), there are, in fact, conditions we can provide that are both necessary and sufficient. I will leave my answer here, as it is useful, I think, but please do not upvote it further, or accept it.
Second Edit: For some reason, Christian decided to delete his answer, rather than fix it, so I will provide a repaired version of it here.
Given $a,binBbb R,$ the real interval $(a,b)$ contains an integer if and only if $a<b$ (this is the necessary condition I was hinting at above) and at least one of the following conditions holds:
$|b-a|>1$ (this is the sufficient condition I was hinting at above), or
$sin(pi a)sin(pi b)<0$ (this comes from Christian's now-deleted answer).
Third (and Final?) Edit: Let me outline a proof of the claim I made in my second edit.
We'll need to assume (or be able to prove) the following basic facts about the sine function:
$xmapstosin(x)$ is a periodic function with fundamental period $2pi$
- $sin(0)=0$
$sin(x)>0$ whenever $0<x<pi$
$sin(x)<0$ whenever $-pi<x<0$
Using these four facts, we can prove
Lemma 1: $sin(x)=0$ if and only if $x=npi$ for some integer $n.$ $Box$
Lemma 2: $sin(x)>0$ if and only if $npi<x<(n+1)pi$ for some even integer $n.$ $Box$
Lemma 3: $sin(x)<0$ if and only if $npi<x<(n+1)pi$ for some odd integer $n.$ $Box$
From these Lemmas, it immediately follows that
Corollary 1: $sin(pi x)=0$ if and only if $x$ is an integer. $Box$
Corollary 2: $sin(pi x)>0$ if and only if $n<x<n+1$ for some even integer $n.$ $Box$
Corollary 3: $sin(pi x)<0$ if and only if $n<x<n+1$ for some odd integer $n.$ $Box$
Putting Corollaries $1$ through $3$ together, we can show that
Proposition 1: Given $a,binBbb R$ with $a<b,$ the following are equivalent:
- $sin(pi a)sin(pi b)<0$
$anotinBbb Z,$ $bnotinBbb Z,$ and $bigl|(a,b)capBbb Zbigr|=2k+1$ for some nonnegative integer $k.$ $Box$
Proposition 2: Given $a,binBbb R$ with $a<b,$ the following are equivalent:
- $sin(pi a)sin(pi b)=0$
$ainBbb Z$ or $binBbb Z.$ $Box$
Proposition 3: Given $a,binBbb R$ with $a<b,$ the following are equivalent:
- $sin(pi a)sin(pi b)>0$
$anotinBbb Z,$ $bnotinBbb Z,$ and $bigl|(a,b)capBbb Zbigr|=2k$ for some nonnegative integer $k.$ $Box$
Now, to bring (most of) it home!
Theorem 1: Suppose that $a,binBbb R.$ Then there is an integer in $(a,b)$ if and only if both of the following hold:
$a<b$ and
$|b-a|>1$ or $sin(pi a)sin(pi b)<0.$
Proof: First, let's suppose that there is an integer in $(a,b),$ meaning that $(a,b)capBbb Zneqemptyset.$ Consequently, $(a,b)neqemptyset,$ and so $a<b,$ as desired. Suppose that $m,nin(a,b)capBbb Z,$ with $mle n.$ Since $a<m,$ then $-m+a<0,$ so $-m<-a,$ and consequently, $$b-m<b-a.tag{1}$$ Furthermore, $n<b,$ so $$n-m<b-m.tag{2}$$ By $(1)$ and $(2),$ since $mle n,$ then $$lvert n-mrvert=n-m<b-m<b-a.tag{3}$$ As $m,n$ are arbitrary elements of $(a,b)capBbb Z,$ then the distance between elements of $(a,b)capBbb Z$ is necessarily finite, and so $(a,b)capBbb Z$ is a finite set, so has either an odd number of elements or an even number of elements. If it has an odd number of elements, then by Proposition 1, we have $sin(pi a)sin(pi b)<0.$ On the other hand, if it has an even number of elements, then there exist distinct elements $m,n,$ and so by $(3),$ we have $1le|n-m|<b-ale|b-a|,$ as desired.
For the other implication, we proceed by way of the contrapositive, and assume that condition 1 fails or condition 2 fails. We show that $(a,b)capBbb Z=emptyset.$ If condition 1 fails, then $(a,b)=emptyset,$ so $(a,b)capBbb Z=emptyset,$ as desired. Suppose instead that condition 2 fails, meaning that $|b-a|le 1$ and $sin(pi a)sin(pi b)ge 0.$ In the case $sin(pi a)sin(pi b)=0,$ we have by Proposition 2 that at least one of $a,b$ is an integer, and since the other is within $1$ of it, then there can be no integer in the interval, meaning $(a,b)capBbb Z=emptyset,$ as desired. On the other hand, let's suppose that $sin(pi a)sin(pi b)>0,$ so that by Proposition 3, $(a,b)capBbb Z$ has $2k$ elements for some non-negative integer $k.$ However, by reasoning as we did in $(1)$ through $(3)$ above, we find that the distance between elements of $(a,b)$ must be less than $1,$ while distinct integers are at least $1$ away from each other, so $(a,b)capBbb Z$ cannot have distinct elements. Hence, $k$ cannot be positive, and so $(a,b)capBbb Z=emptyset,$ as desired. $Box$
However, you weren't asking about integers, but about natural numbers--which for you means positive integers. Consequently, you'd want the following
Corollary 4: Suppose that $a,binBbb R.$ Then there is a natural number in $(a,b)$ if and only if all of the following hold:
$b>1,$
$a<b,$ and
$|b-a|>1$ or $sin(pi a)sin(pi b)<0.$ $Box$
Alternatively, expanding on Hagen's answer, we have:
Theorem 2: Suppose that $a,binBbb R.$ Then there is a natural number in $(a,b)$ if and only if both of the following hold:
$b>1$ and
$lceil brceil-lfloor arfloor>1.$
Proof: Suppose there is a natural number in $(a,b),$ say $n.$ Since $1le n<b,$ then 1 holds. Since $lfloor arfloor$ is an integer with $lfloor arfloorle a<n,$ then $n-lfloor arfloorge1.$ Since $lceil brceil$ is an integer with $n<blelceil brceil,$ then $lceil brceil-nge1,$ so $$lceil brceil-lfloor arfloor=lceil brceil-n+n-lfloor arfloorge1+n-lfloor arfloorge2>1,$$ so 2 holds.
For the other implication, suppose that $b>1$ and $lceil brceil-lfloor arfloor>1.$ By definition, both $lceil brceil$ and $lfloor arfloor$ are integers, so from $lceil brceil-lfloor arfloor>1$ we have that $$lceil brceil-lfloor arfloorge2,$$ $$lfloor arfloor+2lelceil brceil,$$ and so $$lfloor arfloor-1<lfloor arfloor<lfloor arfloor+1lelceil brceil-1.tag{1}$$ Since $lfloor arfloorle a<lfloor arfloor+1,$ then by $(1),$ we have $$a<lceil brceil-1.tag{2}$$ Similarly, $lceil brceil-1<blelceil brceil,$ so we have by $(2)$ that $a<lceil brceil-1<b,$ and so $$lceil brceil-1in(a,b)capBbb Z.tag{3}$$ Now, given any integer $n,$ we have $n<b$ if and only if $n<lfloor brfloor.$ In particular, since $b>1,$ then $1<lfloor brfloor,$ and since $lfloor brfloor$ is an integer, then $$2lelfloor brfloorle blelceil brceil,$$ and so $$1lelceil brceil-1.tag{4}$$ By $(3)$ and $(4),$ we have $$lceil brceil-1in(a,b)capBbb N,$$ as desired. $Box$
$endgroup$
$begingroup$
@ Cameron Buie: This is a nice answer. Can you give a simple proof of that.
$endgroup$
– DER
Nov 12 '14 at 15:20
$begingroup$
Of which part(s)?
$endgroup$
– Cameron Buie
Nov 12 '14 at 15:37
$begingroup$
@ Cameron Buie: In the Second Edit.
$endgroup$
– DER
Nov 12 '14 at 15:39
$begingroup$
I'll see what I can do. Incidentally, do you actually mean "natural numbers" in your post, or do you mean "integers," instead. I was assuming the latter. If it is the former, then I will need your definition of natural number, and I will need to alter my answer.
$endgroup$
– Cameron Buie
Nov 12 '14 at 15:41
$begingroup$
@ Cameron Buie: I mean natural numbers. They are positive integers.
$endgroup$
– DER
Nov 12 '14 at 15:50
|
show 1 more comment
$begingroup$
Think of some examples of intervals $(a,b)$ that don't contain any integers. What do the lengths of those intervals have in common? Play around with interval lengths to get a sufficient condition.
As for necessary conditions, what do we have to know about $a$ and $b$ in order for $(a,b)$ to have any elements? I'm not sure that there are any other necessary conditions than that, though.
First Edit: As one can see from Hagen's answer (and from an easy adaptation of Christian's answer, using the necessary condition that I hinted at), there are, in fact, conditions we can provide that are both necessary and sufficient. I will leave my answer here, as it is useful, I think, but please do not upvote it further, or accept it.
Second Edit: For some reason, Christian decided to delete his answer, rather than fix it, so I will provide a repaired version of it here.
Given $a,binBbb R,$ the real interval $(a,b)$ contains an integer if and only if $a<b$ (this is the necessary condition I was hinting at above) and at least one of the following conditions holds:
$|b-a|>1$ (this is the sufficient condition I was hinting at above), or
$sin(pi a)sin(pi b)<0$ (this comes from Christian's now-deleted answer).
Third (and Final?) Edit: Let me outline a proof of the claim I made in my second edit.
We'll need to assume (or be able to prove) the following basic facts about the sine function:
$xmapstosin(x)$ is a periodic function with fundamental period $2pi$
- $sin(0)=0$
$sin(x)>0$ whenever $0<x<pi$
$sin(x)<0$ whenever $-pi<x<0$
Using these four facts, we can prove
Lemma 1: $sin(x)=0$ if and only if $x=npi$ for some integer $n.$ $Box$
Lemma 2: $sin(x)>0$ if and only if $npi<x<(n+1)pi$ for some even integer $n.$ $Box$
Lemma 3: $sin(x)<0$ if and only if $npi<x<(n+1)pi$ for some odd integer $n.$ $Box$
From these Lemmas, it immediately follows that
Corollary 1: $sin(pi x)=0$ if and only if $x$ is an integer. $Box$
Corollary 2: $sin(pi x)>0$ if and only if $n<x<n+1$ for some even integer $n.$ $Box$
Corollary 3: $sin(pi x)<0$ if and only if $n<x<n+1$ for some odd integer $n.$ $Box$
Putting Corollaries $1$ through $3$ together, we can show that
Proposition 1: Given $a,binBbb R$ with $a<b,$ the following are equivalent:
- $sin(pi a)sin(pi b)<0$
$anotinBbb Z,$ $bnotinBbb Z,$ and $bigl|(a,b)capBbb Zbigr|=2k+1$ for some nonnegative integer $k.$ $Box$
Proposition 2: Given $a,binBbb R$ with $a<b,$ the following are equivalent:
- $sin(pi a)sin(pi b)=0$
$ainBbb Z$ or $binBbb Z.$ $Box$
Proposition 3: Given $a,binBbb R$ with $a<b,$ the following are equivalent:
- $sin(pi a)sin(pi b)>0$
$anotinBbb Z,$ $bnotinBbb Z,$ and $bigl|(a,b)capBbb Zbigr|=2k$ for some nonnegative integer $k.$ $Box$
Now, to bring (most of) it home!
Theorem 1: Suppose that $a,binBbb R.$ Then there is an integer in $(a,b)$ if and only if both of the following hold:
$a<b$ and
$|b-a|>1$ or $sin(pi a)sin(pi b)<0.$
Proof: First, let's suppose that there is an integer in $(a,b),$ meaning that $(a,b)capBbb Zneqemptyset.$ Consequently, $(a,b)neqemptyset,$ and so $a<b,$ as desired. Suppose that $m,nin(a,b)capBbb Z,$ with $mle n.$ Since $a<m,$ then $-m+a<0,$ so $-m<-a,$ and consequently, $$b-m<b-a.tag{1}$$ Furthermore, $n<b,$ so $$n-m<b-m.tag{2}$$ By $(1)$ and $(2),$ since $mle n,$ then $$lvert n-mrvert=n-m<b-m<b-a.tag{3}$$ As $m,n$ are arbitrary elements of $(a,b)capBbb Z,$ then the distance between elements of $(a,b)capBbb Z$ is necessarily finite, and so $(a,b)capBbb Z$ is a finite set, so has either an odd number of elements or an even number of elements. If it has an odd number of elements, then by Proposition 1, we have $sin(pi a)sin(pi b)<0.$ On the other hand, if it has an even number of elements, then there exist distinct elements $m,n,$ and so by $(3),$ we have $1le|n-m|<b-ale|b-a|,$ as desired.
For the other implication, we proceed by way of the contrapositive, and assume that condition 1 fails or condition 2 fails. We show that $(a,b)capBbb Z=emptyset.$ If condition 1 fails, then $(a,b)=emptyset,$ so $(a,b)capBbb Z=emptyset,$ as desired. Suppose instead that condition 2 fails, meaning that $|b-a|le 1$ and $sin(pi a)sin(pi b)ge 0.$ In the case $sin(pi a)sin(pi b)=0,$ we have by Proposition 2 that at least one of $a,b$ is an integer, and since the other is within $1$ of it, then there can be no integer in the interval, meaning $(a,b)capBbb Z=emptyset,$ as desired. On the other hand, let's suppose that $sin(pi a)sin(pi b)>0,$ so that by Proposition 3, $(a,b)capBbb Z$ has $2k$ elements for some non-negative integer $k.$ However, by reasoning as we did in $(1)$ through $(3)$ above, we find that the distance between elements of $(a,b)$ must be less than $1,$ while distinct integers are at least $1$ away from each other, so $(a,b)capBbb Z$ cannot have distinct elements. Hence, $k$ cannot be positive, and so $(a,b)capBbb Z=emptyset,$ as desired. $Box$
However, you weren't asking about integers, but about natural numbers--which for you means positive integers. Consequently, you'd want the following
Corollary 4: Suppose that $a,binBbb R.$ Then there is a natural number in $(a,b)$ if and only if all of the following hold:
$b>1,$
$a<b,$ and
$|b-a|>1$ or $sin(pi a)sin(pi b)<0.$ $Box$
Alternatively, expanding on Hagen's answer, we have:
Theorem 2: Suppose that $a,binBbb R.$ Then there is a natural number in $(a,b)$ if and only if both of the following hold:
$b>1$ and
$lceil brceil-lfloor arfloor>1.$
Proof: Suppose there is a natural number in $(a,b),$ say $n.$ Since $1le n<b,$ then 1 holds. Since $lfloor arfloor$ is an integer with $lfloor arfloorle a<n,$ then $n-lfloor arfloorge1.$ Since $lceil brceil$ is an integer with $n<blelceil brceil,$ then $lceil brceil-nge1,$ so $$lceil brceil-lfloor arfloor=lceil brceil-n+n-lfloor arfloorge1+n-lfloor arfloorge2>1,$$ so 2 holds.
For the other implication, suppose that $b>1$ and $lceil brceil-lfloor arfloor>1.$ By definition, both $lceil brceil$ and $lfloor arfloor$ are integers, so from $lceil brceil-lfloor arfloor>1$ we have that $$lceil brceil-lfloor arfloorge2,$$ $$lfloor arfloor+2lelceil brceil,$$ and so $$lfloor arfloor-1<lfloor arfloor<lfloor arfloor+1lelceil brceil-1.tag{1}$$ Since $lfloor arfloorle a<lfloor arfloor+1,$ then by $(1),$ we have $$a<lceil brceil-1.tag{2}$$ Similarly, $lceil brceil-1<blelceil brceil,$ so we have by $(2)$ that $a<lceil brceil-1<b,$ and so $$lceil brceil-1in(a,b)capBbb Z.tag{3}$$ Now, given any integer $n,$ we have $n<b$ if and only if $n<lfloor brfloor.$ In particular, since $b>1,$ then $1<lfloor brfloor,$ and since $lfloor brfloor$ is an integer, then $$2lelfloor brfloorle blelceil brceil,$$ and so $$1lelceil brceil-1.tag{4}$$ By $(3)$ and $(4),$ we have $$lceil brceil-1in(a,b)capBbb N,$$ as desired. $Box$
$endgroup$
Think of some examples of intervals $(a,b)$ that don't contain any integers. What do the lengths of those intervals have in common? Play around with interval lengths to get a sufficient condition.
As for necessary conditions, what do we have to know about $a$ and $b$ in order for $(a,b)$ to have any elements? I'm not sure that there are any other necessary conditions than that, though.
First Edit: As one can see from Hagen's answer (and from an easy adaptation of Christian's answer, using the necessary condition that I hinted at), there are, in fact, conditions we can provide that are both necessary and sufficient. I will leave my answer here, as it is useful, I think, but please do not upvote it further, or accept it.
Second Edit: For some reason, Christian decided to delete his answer, rather than fix it, so I will provide a repaired version of it here.
Given $a,binBbb R,$ the real interval $(a,b)$ contains an integer if and only if $a<b$ (this is the necessary condition I was hinting at above) and at least one of the following conditions holds:
$|b-a|>1$ (this is the sufficient condition I was hinting at above), or
$sin(pi a)sin(pi b)<0$ (this comes from Christian's now-deleted answer).
Third (and Final?) Edit: Let me outline a proof of the claim I made in my second edit.
We'll need to assume (or be able to prove) the following basic facts about the sine function:
$xmapstosin(x)$ is a periodic function with fundamental period $2pi$
- $sin(0)=0$
$sin(x)>0$ whenever $0<x<pi$
$sin(x)<0$ whenever $-pi<x<0$
Using these four facts, we can prove
Lemma 1: $sin(x)=0$ if and only if $x=npi$ for some integer $n.$ $Box$
Lemma 2: $sin(x)>0$ if and only if $npi<x<(n+1)pi$ for some even integer $n.$ $Box$
Lemma 3: $sin(x)<0$ if and only if $npi<x<(n+1)pi$ for some odd integer $n.$ $Box$
From these Lemmas, it immediately follows that
Corollary 1: $sin(pi x)=0$ if and only if $x$ is an integer. $Box$
Corollary 2: $sin(pi x)>0$ if and only if $n<x<n+1$ for some even integer $n.$ $Box$
Corollary 3: $sin(pi x)<0$ if and only if $n<x<n+1$ for some odd integer $n.$ $Box$
Putting Corollaries $1$ through $3$ together, we can show that
Proposition 1: Given $a,binBbb R$ with $a<b,$ the following are equivalent:
- $sin(pi a)sin(pi b)<0$
$anotinBbb Z,$ $bnotinBbb Z,$ and $bigl|(a,b)capBbb Zbigr|=2k+1$ for some nonnegative integer $k.$ $Box$
Proposition 2: Given $a,binBbb R$ with $a<b,$ the following are equivalent:
- $sin(pi a)sin(pi b)=0$
$ainBbb Z$ or $binBbb Z.$ $Box$
Proposition 3: Given $a,binBbb R$ with $a<b,$ the following are equivalent:
- $sin(pi a)sin(pi b)>0$
$anotinBbb Z,$ $bnotinBbb Z,$ and $bigl|(a,b)capBbb Zbigr|=2k$ for some nonnegative integer $k.$ $Box$
Now, to bring (most of) it home!
Theorem 1: Suppose that $a,binBbb R.$ Then there is an integer in $(a,b)$ if and only if both of the following hold:
$a<b$ and
$|b-a|>1$ or $sin(pi a)sin(pi b)<0.$
Proof: First, let's suppose that there is an integer in $(a,b),$ meaning that $(a,b)capBbb Zneqemptyset.$ Consequently, $(a,b)neqemptyset,$ and so $a<b,$ as desired. Suppose that $m,nin(a,b)capBbb Z,$ with $mle n.$ Since $a<m,$ then $-m+a<0,$ so $-m<-a,$ and consequently, $$b-m<b-a.tag{1}$$ Furthermore, $n<b,$ so $$n-m<b-m.tag{2}$$ By $(1)$ and $(2),$ since $mle n,$ then $$lvert n-mrvert=n-m<b-m<b-a.tag{3}$$ As $m,n$ are arbitrary elements of $(a,b)capBbb Z,$ then the distance between elements of $(a,b)capBbb Z$ is necessarily finite, and so $(a,b)capBbb Z$ is a finite set, so has either an odd number of elements or an even number of elements. If it has an odd number of elements, then by Proposition 1, we have $sin(pi a)sin(pi b)<0.$ On the other hand, if it has an even number of elements, then there exist distinct elements $m,n,$ and so by $(3),$ we have $1le|n-m|<b-ale|b-a|,$ as desired.
For the other implication, we proceed by way of the contrapositive, and assume that condition 1 fails or condition 2 fails. We show that $(a,b)capBbb Z=emptyset.$ If condition 1 fails, then $(a,b)=emptyset,$ so $(a,b)capBbb Z=emptyset,$ as desired. Suppose instead that condition 2 fails, meaning that $|b-a|le 1$ and $sin(pi a)sin(pi b)ge 0.$ In the case $sin(pi a)sin(pi b)=0,$ we have by Proposition 2 that at least one of $a,b$ is an integer, and since the other is within $1$ of it, then there can be no integer in the interval, meaning $(a,b)capBbb Z=emptyset,$ as desired. On the other hand, let's suppose that $sin(pi a)sin(pi b)>0,$ so that by Proposition 3, $(a,b)capBbb Z$ has $2k$ elements for some non-negative integer $k.$ However, by reasoning as we did in $(1)$ through $(3)$ above, we find that the distance between elements of $(a,b)$ must be less than $1,$ while distinct integers are at least $1$ away from each other, so $(a,b)capBbb Z$ cannot have distinct elements. Hence, $k$ cannot be positive, and so $(a,b)capBbb Z=emptyset,$ as desired. $Box$
However, you weren't asking about integers, but about natural numbers--which for you means positive integers. Consequently, you'd want the following
Corollary 4: Suppose that $a,binBbb R.$ Then there is a natural number in $(a,b)$ if and only if all of the following hold:
$b>1,$
$a<b,$ and
$|b-a|>1$ or $sin(pi a)sin(pi b)<0.$ $Box$
Alternatively, expanding on Hagen's answer, we have:
Theorem 2: Suppose that $a,binBbb R.$ Then there is a natural number in $(a,b)$ if and only if both of the following hold:
$b>1$ and
$lceil brceil-lfloor arfloor>1.$
Proof: Suppose there is a natural number in $(a,b),$ say $n.$ Since $1le n<b,$ then 1 holds. Since $lfloor arfloor$ is an integer with $lfloor arfloorle a<n,$ then $n-lfloor arfloorge1.$ Since $lceil brceil$ is an integer with $n<blelceil brceil,$ then $lceil brceil-nge1,$ so $$lceil brceil-lfloor arfloor=lceil brceil-n+n-lfloor arfloorge1+n-lfloor arfloorge2>1,$$ so 2 holds.
For the other implication, suppose that $b>1$ and $lceil brceil-lfloor arfloor>1.$ By definition, both $lceil brceil$ and $lfloor arfloor$ are integers, so from $lceil brceil-lfloor arfloor>1$ we have that $$lceil brceil-lfloor arfloorge2,$$ $$lfloor arfloor+2lelceil brceil,$$ and so $$lfloor arfloor-1<lfloor arfloor<lfloor arfloor+1lelceil brceil-1.tag{1}$$ Since $lfloor arfloorle a<lfloor arfloor+1,$ then by $(1),$ we have $$a<lceil brceil-1.tag{2}$$ Similarly, $lceil brceil-1<blelceil brceil,$ so we have by $(2)$ that $a<lceil brceil-1<b,$ and so $$lceil brceil-1in(a,b)capBbb Z.tag{3}$$ Now, given any integer $n,$ we have $n<b$ if and only if $n<lfloor brfloor.$ In particular, since $b>1,$ then $1<lfloor brfloor,$ and since $lfloor brfloor$ is an integer, then $$2lelfloor brfloorle blelceil brceil,$$ and so $$1lelceil brceil-1.tag{4}$$ By $(3)$ and $(4),$ we have $$lceil brceil-1in(a,b)capBbb N,$$ as desired. $Box$
edited Jan 24 at 20:44
answered Nov 5 '14 at 15:03
Cameron BuieCameron Buie
85.6k772160
85.6k772160
$begingroup$
@ Cameron Buie: This is a nice answer. Can you give a simple proof of that.
$endgroup$
– DER
Nov 12 '14 at 15:20
$begingroup$
Of which part(s)?
$endgroup$
– Cameron Buie
Nov 12 '14 at 15:37
$begingroup$
@ Cameron Buie: In the Second Edit.
$endgroup$
– DER
Nov 12 '14 at 15:39
$begingroup$
I'll see what I can do. Incidentally, do you actually mean "natural numbers" in your post, or do you mean "integers," instead. I was assuming the latter. If it is the former, then I will need your definition of natural number, and I will need to alter my answer.
$endgroup$
– Cameron Buie
Nov 12 '14 at 15:41
$begingroup$
@ Cameron Buie: I mean natural numbers. They are positive integers.
$endgroup$
– DER
Nov 12 '14 at 15:50
|
show 1 more comment
$begingroup$
@ Cameron Buie: This is a nice answer. Can you give a simple proof of that.
$endgroup$
– DER
Nov 12 '14 at 15:20
$begingroup$
Of which part(s)?
$endgroup$
– Cameron Buie
Nov 12 '14 at 15:37
$begingroup$
@ Cameron Buie: In the Second Edit.
$endgroup$
– DER
Nov 12 '14 at 15:39
$begingroup$
I'll see what I can do. Incidentally, do you actually mean "natural numbers" in your post, or do you mean "integers," instead. I was assuming the latter. If it is the former, then I will need your definition of natural number, and I will need to alter my answer.
$endgroup$
– Cameron Buie
Nov 12 '14 at 15:41
$begingroup$
@ Cameron Buie: I mean natural numbers. They are positive integers.
$endgroup$
– DER
Nov 12 '14 at 15:50
$begingroup$
@ Cameron Buie: This is a nice answer. Can you give a simple proof of that.
$endgroup$
– DER
Nov 12 '14 at 15:20
$begingroup$
@ Cameron Buie: This is a nice answer. Can you give a simple proof of that.
$endgroup$
– DER
Nov 12 '14 at 15:20
$begingroup$
Of which part(s)?
$endgroup$
– Cameron Buie
Nov 12 '14 at 15:37
$begingroup$
Of which part(s)?
$endgroup$
– Cameron Buie
Nov 12 '14 at 15:37
$begingroup$
@ Cameron Buie: In the Second Edit.
$endgroup$
– DER
Nov 12 '14 at 15:39
$begingroup$
@ Cameron Buie: In the Second Edit.
$endgroup$
– DER
Nov 12 '14 at 15:39
$begingroup$
I'll see what I can do. Incidentally, do you actually mean "natural numbers" in your post, or do you mean "integers," instead. I was assuming the latter. If it is the former, then I will need your definition of natural number, and I will need to alter my answer.
$endgroup$
– Cameron Buie
Nov 12 '14 at 15:41
$begingroup$
I'll see what I can do. Incidentally, do you actually mean "natural numbers" in your post, or do you mean "integers," instead. I was assuming the latter. If it is the former, then I will need your definition of natural number, and I will need to alter my answer.
$endgroup$
– Cameron Buie
Nov 12 '14 at 15:41
$begingroup$
@ Cameron Buie: I mean natural numbers. They are positive integers.
$endgroup$
– DER
Nov 12 '14 at 15:50
$begingroup$
@ Cameron Buie: I mean natural numbers. They are positive integers.
$endgroup$
– DER
Nov 12 '14 at 15:50
|
show 1 more comment
$begingroup$
This is a little exegesis on Hagen von Eitzen's wonderfully simple answer, $lceil brceil-lfloor arfloorgt1$ as a necessary and sufficient condition for there to be an integer in the open interval with endpoints $a$ and $b$.
The one drawback to this formula is that it relies on the tacit assumption $ale b$. In comments below Hagen's answer I proposed a formula that was agnostic on the issue of which was bigger, but the formula I gave fails rather badly, so I'd just as soon no one look it.
One can, of course, replace $a$ and $b$ with $min(a,b)$ and $max(a,b)$ in Hagen's formula. In fact, playing with the identities $lceil xrceil=-lfloor -xrfloor$ and $max(a,b)=-min(-a,-b)$, one can write the condition as
$$lfloormin(a,b)rfloor+lfloormin(-a,-b)rfloorlt-1$$
But it'd be nice, I thought, not to use the comparison function(s), and give a necessary and sufficient condition strictly in terms of arithmetic operations and the floor (and ceiling) function. So here's one which, unlike my first proposal, actually works:
$$left(lfloor arfloor-lfloor brfloor right)left(lceil arceil-lceil brceil right)left(left(a-lfloor arfloor right)^2+left(b-lfloor brfloor right)^2+left((a-b)^2-1 right)^2 right)not=0$$
That is, the only way there is no integer between $a$ and $b$ is if $a,bin[k,k+1]$ for some integer $k$, in which case either $a$ and $b$ both round down to $k$, or both round up to $k+1$, or else one is $k$ and the other is $k+1$, which is to say, they are both integers and they differ by $1$. The three factors on the left hand side correspond to these three possibilities.
The obvious drawback here is the formula's ungainliness. But I'm hard pressed to think of anything substantially simpler. I'd be happy to see a gainlier one.
$endgroup$
add a comment |
$begingroup$
This is a little exegesis on Hagen von Eitzen's wonderfully simple answer, $lceil brceil-lfloor arfloorgt1$ as a necessary and sufficient condition for there to be an integer in the open interval with endpoints $a$ and $b$.
The one drawback to this formula is that it relies on the tacit assumption $ale b$. In comments below Hagen's answer I proposed a formula that was agnostic on the issue of which was bigger, but the formula I gave fails rather badly, so I'd just as soon no one look it.
One can, of course, replace $a$ and $b$ with $min(a,b)$ and $max(a,b)$ in Hagen's formula. In fact, playing with the identities $lceil xrceil=-lfloor -xrfloor$ and $max(a,b)=-min(-a,-b)$, one can write the condition as
$$lfloormin(a,b)rfloor+lfloormin(-a,-b)rfloorlt-1$$
But it'd be nice, I thought, not to use the comparison function(s), and give a necessary and sufficient condition strictly in terms of arithmetic operations and the floor (and ceiling) function. So here's one which, unlike my first proposal, actually works:
$$left(lfloor arfloor-lfloor brfloor right)left(lceil arceil-lceil brceil right)left(left(a-lfloor arfloor right)^2+left(b-lfloor brfloor right)^2+left((a-b)^2-1 right)^2 right)not=0$$
That is, the only way there is no integer between $a$ and $b$ is if $a,bin[k,k+1]$ for some integer $k$, in which case either $a$ and $b$ both round down to $k$, or both round up to $k+1$, or else one is $k$ and the other is $k+1$, which is to say, they are both integers and they differ by $1$. The three factors on the left hand side correspond to these three possibilities.
The obvious drawback here is the formula's ungainliness. But I'm hard pressed to think of anything substantially simpler. I'd be happy to see a gainlier one.
$endgroup$
add a comment |
$begingroup$
This is a little exegesis on Hagen von Eitzen's wonderfully simple answer, $lceil brceil-lfloor arfloorgt1$ as a necessary and sufficient condition for there to be an integer in the open interval with endpoints $a$ and $b$.
The one drawback to this formula is that it relies on the tacit assumption $ale b$. In comments below Hagen's answer I proposed a formula that was agnostic on the issue of which was bigger, but the formula I gave fails rather badly, so I'd just as soon no one look it.
One can, of course, replace $a$ and $b$ with $min(a,b)$ and $max(a,b)$ in Hagen's formula. In fact, playing with the identities $lceil xrceil=-lfloor -xrfloor$ and $max(a,b)=-min(-a,-b)$, one can write the condition as
$$lfloormin(a,b)rfloor+lfloormin(-a,-b)rfloorlt-1$$
But it'd be nice, I thought, not to use the comparison function(s), and give a necessary and sufficient condition strictly in terms of arithmetic operations and the floor (and ceiling) function. So here's one which, unlike my first proposal, actually works:
$$left(lfloor arfloor-lfloor brfloor right)left(lceil arceil-lceil brceil right)left(left(a-lfloor arfloor right)^2+left(b-lfloor brfloor right)^2+left((a-b)^2-1 right)^2 right)not=0$$
That is, the only way there is no integer between $a$ and $b$ is if $a,bin[k,k+1]$ for some integer $k$, in which case either $a$ and $b$ both round down to $k$, or both round up to $k+1$, or else one is $k$ and the other is $k+1$, which is to say, they are both integers and they differ by $1$. The three factors on the left hand side correspond to these three possibilities.
The obvious drawback here is the formula's ungainliness. But I'm hard pressed to think of anything substantially simpler. I'd be happy to see a gainlier one.
$endgroup$
This is a little exegesis on Hagen von Eitzen's wonderfully simple answer, $lceil brceil-lfloor arfloorgt1$ as a necessary and sufficient condition for there to be an integer in the open interval with endpoints $a$ and $b$.
The one drawback to this formula is that it relies on the tacit assumption $ale b$. In comments below Hagen's answer I proposed a formula that was agnostic on the issue of which was bigger, but the formula I gave fails rather badly, so I'd just as soon no one look it.
One can, of course, replace $a$ and $b$ with $min(a,b)$ and $max(a,b)$ in Hagen's formula. In fact, playing with the identities $lceil xrceil=-lfloor -xrfloor$ and $max(a,b)=-min(-a,-b)$, one can write the condition as
$$lfloormin(a,b)rfloor+lfloormin(-a,-b)rfloorlt-1$$
But it'd be nice, I thought, not to use the comparison function(s), and give a necessary and sufficient condition strictly in terms of arithmetic operations and the floor (and ceiling) function. So here's one which, unlike my first proposal, actually works:
$$left(lfloor arfloor-lfloor brfloor right)left(lceil arceil-lceil brceil right)left(left(a-lfloor arfloor right)^2+left(b-lfloor brfloor right)^2+left((a-b)^2-1 right)^2 right)not=0$$
That is, the only way there is no integer between $a$ and $b$ is if $a,bin[k,k+1]$ for some integer $k$, in which case either $a$ and $b$ both round down to $k$, or both round up to $k+1$, or else one is $k$ and the other is $k+1$, which is to say, they are both integers and they differ by $1$. The three factors on the left hand side correspond to these three possibilities.
The obvious drawback here is the formula's ungainliness. But I'm hard pressed to think of anything substantially simpler. I'd be happy to see a gainlier one.
answered Nov 6 '14 at 15:06
Barry CipraBarry Cipra
59.9k654126
59.9k654126
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%2f1007461%2fabout-the-location-of-natural-numbers%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
9
$begingroup$
I can't imagine a condition that would be simpler than "there is an integer in $(a,b)$". One could invent more complicated conditions (as in Christian Blatter's answer) but what would be the point? Is there a particular kind of condition you are looking for?
$endgroup$
– Nate Eldredge
Nov 5 '14 at 15:53
1
$begingroup$
Are you sure you mean natural numbers?
$endgroup$
– imallett
Nov 5 '14 at 23:53
$begingroup$
@GraphicsResearch: Yes, I mean that.
$endgroup$
– DER
Nov 6 '14 at 6:10
1
$begingroup$
@DER . . . are you sure? Not, for example, the integers? The answers below, including the one you've accepted, do not hold for N, although they do hold for Z.
$endgroup$
– imallett
Nov 6 '14 at 6:12