How many unique integers to be obtained by $leftlceilfrac{F}{1:1:N}rightrceil$?
Assume that $F$ and $N$ are positive integers, and $N<F$. How many unique integers would I get if I apply the ceiling function to the division of $F$ divided by $1,2,ldots,N$, respectively. That is, I want a formula to (approximately) count
$mathrm{texttt{length}}(mathrm{texttt{unique}}left(mathrm{texttt{ceil}}(F./(1:1:N))right))$, which is expressed in Matlab language.
combinatorics number-theory elementary-number-theory combinations
add a comment |
Assume that $F$ and $N$ are positive integers, and $N<F$. How many unique integers would I get if I apply the ceiling function to the division of $F$ divided by $1,2,ldots,N$, respectively. That is, I want a formula to (approximately) count
$mathrm{texttt{length}}(mathrm{texttt{unique}}left(mathrm{texttt{ceil}}(F./(1:1:N))right))$, which is expressed in Matlab language.
combinatorics number-theory elementary-number-theory combinations
add a comment |
Assume that $F$ and $N$ are positive integers, and $N<F$. How many unique integers would I get if I apply the ceiling function to the division of $F$ divided by $1,2,ldots,N$, respectively. That is, I want a formula to (approximately) count
$mathrm{texttt{length}}(mathrm{texttt{unique}}left(mathrm{texttt{ceil}}(F./(1:1:N))right))$, which is expressed in Matlab language.
combinatorics number-theory elementary-number-theory combinations
Assume that $F$ and $N$ are positive integers, and $N<F$. How many unique integers would I get if I apply the ceiling function to the division of $F$ divided by $1,2,ldots,N$, respectively. That is, I want a formula to (approximately) count
$mathrm{texttt{length}}(mathrm{texttt{unique}}left(mathrm{texttt{ceil}}(F./(1:1:N))right))$, which is expressed in Matlab language.
combinatorics number-theory elementary-number-theory combinations
combinatorics number-theory elementary-number-theory combinations
asked Nov 20 '18 at 7:49
leeyee
656
656
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Let $g_f(n)=leftlceil frac{f}{n}rightrceil$. We may first look at the forward difference of $g_f$, which is $Delta[g_f](n)=g_f(n+1)-g_f(n)$. When $Delta[g_f](n)geq -1$ for all $ngeq n_0$, then $g_f(n)$ will take on all values from $g_f(n_0)$ to $g_f(f-1)=2$ when $ngeq n_0.$ Additionally, if $$fleft(frac{1}{n_0+1}-frac{1}{n_0}right)= -1,$$ then for all $ngeq n_0$, $$fleft(frac{1}{n_0+1}-frac{1}{n_0}right)geq -1,$$ so $$Delta[g_f](n)geq -1.$$ We also note that if $$fleft(frac{1}{n_0+1}-frac{1}{n_0}right)< -1,$$ then for all $n<n_0$, $$Delta[g_f](n)< -1,$$ so every value of $g_f(n)$ is unique for all $n<n_0$. When we solve for $n_0$, we get $n_0^2 +n_0-f=0$, so $$n_0=frac{-1+sqrt{1+4f}}{2}.$$ However, $$0leqleftlceilsqrt{f}rightrceil-leftlceilfrac{-1+sqrt{1+4f}}{2}rightrceilleq 1.$$ So if we were to use $n_1=sqrt{f}$ instead of $n_0$, the inequalities for $Delta[g_f](n)$ would still hold. Thus, the number of unique values of $g_f(n)$ where $1leq n<f$ is $$lceil n_1rceil-1+g_f(lceil n_1 rceil)-1=2leftlceil sqrt{f}rightrceil -2.$$ Now the number of unique values of $g_f(n)$, where $1leq n leq N < f$ is $$begin{cases}N & N<leftlceil sqrt{f}rightrceil\ 2leftlceil sqrt{f}rightrceil -leftlceilfrac{f}{N}rightrceil & Ngeq leftlceil sqrt{f}rightrceil. end{cases}$$ The first case comes from the fact that every value of $g_f(n)$ is unique for all $n<n_1$, and the second case comes from the fact that $g_f(n)$ will take on all values from $g_f(n_1)$ to $g_f(f-1)=2$ when $ngeq n_1,$ but we lose all the values from $g_f(N)-1$ and $2$ by the restriction $nleq N$.
Shouldn't the final answer depend on both $F$ and $N$?
– Misha Lavrov
Nov 20 '18 at 15:55
Oh I misread it as counting all unique $g_f(n)$ where $1leq n < f$. I’ll see if I can fix it and resubmit my answer.
– Jacob
Nov 20 '18 at 16:09
@mishalavrov I’ve fixed it.
– Jacob
Nov 20 '18 at 16:42
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%2f3006060%2fhow-many-unique-integers-to-be-obtained-by-left-lceil-fracf11n-right-rce%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Let $g_f(n)=leftlceil frac{f}{n}rightrceil$. We may first look at the forward difference of $g_f$, which is $Delta[g_f](n)=g_f(n+1)-g_f(n)$. When $Delta[g_f](n)geq -1$ for all $ngeq n_0$, then $g_f(n)$ will take on all values from $g_f(n_0)$ to $g_f(f-1)=2$ when $ngeq n_0.$ Additionally, if $$fleft(frac{1}{n_0+1}-frac{1}{n_0}right)= -1,$$ then for all $ngeq n_0$, $$fleft(frac{1}{n_0+1}-frac{1}{n_0}right)geq -1,$$ so $$Delta[g_f](n)geq -1.$$ We also note that if $$fleft(frac{1}{n_0+1}-frac{1}{n_0}right)< -1,$$ then for all $n<n_0$, $$Delta[g_f](n)< -1,$$ so every value of $g_f(n)$ is unique for all $n<n_0$. When we solve for $n_0$, we get $n_0^2 +n_0-f=0$, so $$n_0=frac{-1+sqrt{1+4f}}{2}.$$ However, $$0leqleftlceilsqrt{f}rightrceil-leftlceilfrac{-1+sqrt{1+4f}}{2}rightrceilleq 1.$$ So if we were to use $n_1=sqrt{f}$ instead of $n_0$, the inequalities for $Delta[g_f](n)$ would still hold. Thus, the number of unique values of $g_f(n)$ where $1leq n<f$ is $$lceil n_1rceil-1+g_f(lceil n_1 rceil)-1=2leftlceil sqrt{f}rightrceil -2.$$ Now the number of unique values of $g_f(n)$, where $1leq n leq N < f$ is $$begin{cases}N & N<leftlceil sqrt{f}rightrceil\ 2leftlceil sqrt{f}rightrceil -leftlceilfrac{f}{N}rightrceil & Ngeq leftlceil sqrt{f}rightrceil. end{cases}$$ The first case comes from the fact that every value of $g_f(n)$ is unique for all $n<n_1$, and the second case comes from the fact that $g_f(n)$ will take on all values from $g_f(n_1)$ to $g_f(f-1)=2$ when $ngeq n_1,$ but we lose all the values from $g_f(N)-1$ and $2$ by the restriction $nleq N$.
Shouldn't the final answer depend on both $F$ and $N$?
– Misha Lavrov
Nov 20 '18 at 15:55
Oh I misread it as counting all unique $g_f(n)$ where $1leq n < f$. I’ll see if I can fix it and resubmit my answer.
– Jacob
Nov 20 '18 at 16:09
@mishalavrov I’ve fixed it.
– Jacob
Nov 20 '18 at 16:42
add a comment |
Let $g_f(n)=leftlceil frac{f}{n}rightrceil$. We may first look at the forward difference of $g_f$, which is $Delta[g_f](n)=g_f(n+1)-g_f(n)$. When $Delta[g_f](n)geq -1$ for all $ngeq n_0$, then $g_f(n)$ will take on all values from $g_f(n_0)$ to $g_f(f-1)=2$ when $ngeq n_0.$ Additionally, if $$fleft(frac{1}{n_0+1}-frac{1}{n_0}right)= -1,$$ then for all $ngeq n_0$, $$fleft(frac{1}{n_0+1}-frac{1}{n_0}right)geq -1,$$ so $$Delta[g_f](n)geq -1.$$ We also note that if $$fleft(frac{1}{n_0+1}-frac{1}{n_0}right)< -1,$$ then for all $n<n_0$, $$Delta[g_f](n)< -1,$$ so every value of $g_f(n)$ is unique for all $n<n_0$. When we solve for $n_0$, we get $n_0^2 +n_0-f=0$, so $$n_0=frac{-1+sqrt{1+4f}}{2}.$$ However, $$0leqleftlceilsqrt{f}rightrceil-leftlceilfrac{-1+sqrt{1+4f}}{2}rightrceilleq 1.$$ So if we were to use $n_1=sqrt{f}$ instead of $n_0$, the inequalities for $Delta[g_f](n)$ would still hold. Thus, the number of unique values of $g_f(n)$ where $1leq n<f$ is $$lceil n_1rceil-1+g_f(lceil n_1 rceil)-1=2leftlceil sqrt{f}rightrceil -2.$$ Now the number of unique values of $g_f(n)$, where $1leq n leq N < f$ is $$begin{cases}N & N<leftlceil sqrt{f}rightrceil\ 2leftlceil sqrt{f}rightrceil -leftlceilfrac{f}{N}rightrceil & Ngeq leftlceil sqrt{f}rightrceil. end{cases}$$ The first case comes from the fact that every value of $g_f(n)$ is unique for all $n<n_1$, and the second case comes from the fact that $g_f(n)$ will take on all values from $g_f(n_1)$ to $g_f(f-1)=2$ when $ngeq n_1,$ but we lose all the values from $g_f(N)-1$ and $2$ by the restriction $nleq N$.
Shouldn't the final answer depend on both $F$ and $N$?
– Misha Lavrov
Nov 20 '18 at 15:55
Oh I misread it as counting all unique $g_f(n)$ where $1leq n < f$. I’ll see if I can fix it and resubmit my answer.
– Jacob
Nov 20 '18 at 16:09
@mishalavrov I’ve fixed it.
– Jacob
Nov 20 '18 at 16:42
add a comment |
Let $g_f(n)=leftlceil frac{f}{n}rightrceil$. We may first look at the forward difference of $g_f$, which is $Delta[g_f](n)=g_f(n+1)-g_f(n)$. When $Delta[g_f](n)geq -1$ for all $ngeq n_0$, then $g_f(n)$ will take on all values from $g_f(n_0)$ to $g_f(f-1)=2$ when $ngeq n_0.$ Additionally, if $$fleft(frac{1}{n_0+1}-frac{1}{n_0}right)= -1,$$ then for all $ngeq n_0$, $$fleft(frac{1}{n_0+1}-frac{1}{n_0}right)geq -1,$$ so $$Delta[g_f](n)geq -1.$$ We also note that if $$fleft(frac{1}{n_0+1}-frac{1}{n_0}right)< -1,$$ then for all $n<n_0$, $$Delta[g_f](n)< -1,$$ so every value of $g_f(n)$ is unique for all $n<n_0$. When we solve for $n_0$, we get $n_0^2 +n_0-f=0$, so $$n_0=frac{-1+sqrt{1+4f}}{2}.$$ However, $$0leqleftlceilsqrt{f}rightrceil-leftlceilfrac{-1+sqrt{1+4f}}{2}rightrceilleq 1.$$ So if we were to use $n_1=sqrt{f}$ instead of $n_0$, the inequalities for $Delta[g_f](n)$ would still hold. Thus, the number of unique values of $g_f(n)$ where $1leq n<f$ is $$lceil n_1rceil-1+g_f(lceil n_1 rceil)-1=2leftlceil sqrt{f}rightrceil -2.$$ Now the number of unique values of $g_f(n)$, where $1leq n leq N < f$ is $$begin{cases}N & N<leftlceil sqrt{f}rightrceil\ 2leftlceil sqrt{f}rightrceil -leftlceilfrac{f}{N}rightrceil & Ngeq leftlceil sqrt{f}rightrceil. end{cases}$$ The first case comes from the fact that every value of $g_f(n)$ is unique for all $n<n_1$, and the second case comes from the fact that $g_f(n)$ will take on all values from $g_f(n_1)$ to $g_f(f-1)=2$ when $ngeq n_1,$ but we lose all the values from $g_f(N)-1$ and $2$ by the restriction $nleq N$.
Let $g_f(n)=leftlceil frac{f}{n}rightrceil$. We may first look at the forward difference of $g_f$, which is $Delta[g_f](n)=g_f(n+1)-g_f(n)$. When $Delta[g_f](n)geq -1$ for all $ngeq n_0$, then $g_f(n)$ will take on all values from $g_f(n_0)$ to $g_f(f-1)=2$ when $ngeq n_0.$ Additionally, if $$fleft(frac{1}{n_0+1}-frac{1}{n_0}right)= -1,$$ then for all $ngeq n_0$, $$fleft(frac{1}{n_0+1}-frac{1}{n_0}right)geq -1,$$ so $$Delta[g_f](n)geq -1.$$ We also note that if $$fleft(frac{1}{n_0+1}-frac{1}{n_0}right)< -1,$$ then for all $n<n_0$, $$Delta[g_f](n)< -1,$$ so every value of $g_f(n)$ is unique for all $n<n_0$. When we solve for $n_0$, we get $n_0^2 +n_0-f=0$, so $$n_0=frac{-1+sqrt{1+4f}}{2}.$$ However, $$0leqleftlceilsqrt{f}rightrceil-leftlceilfrac{-1+sqrt{1+4f}}{2}rightrceilleq 1.$$ So if we were to use $n_1=sqrt{f}$ instead of $n_0$, the inequalities for $Delta[g_f](n)$ would still hold. Thus, the number of unique values of $g_f(n)$ where $1leq n<f$ is $$lceil n_1rceil-1+g_f(lceil n_1 rceil)-1=2leftlceil sqrt{f}rightrceil -2.$$ Now the number of unique values of $g_f(n)$, where $1leq n leq N < f$ is $$begin{cases}N & N<leftlceil sqrt{f}rightrceil\ 2leftlceil sqrt{f}rightrceil -leftlceilfrac{f}{N}rightrceil & Ngeq leftlceil sqrt{f}rightrceil. end{cases}$$ The first case comes from the fact that every value of $g_f(n)$ is unique for all $n<n_1$, and the second case comes from the fact that $g_f(n)$ will take on all values from $g_f(n_1)$ to $g_f(f-1)=2$ when $ngeq n_1,$ but we lose all the values from $g_f(N)-1$ and $2$ by the restriction $nleq N$.
edited Nov 20 '18 at 16:41
answered Nov 20 '18 at 14:55
Jacob
1,092715
1,092715
Shouldn't the final answer depend on both $F$ and $N$?
– Misha Lavrov
Nov 20 '18 at 15:55
Oh I misread it as counting all unique $g_f(n)$ where $1leq n < f$. I’ll see if I can fix it and resubmit my answer.
– Jacob
Nov 20 '18 at 16:09
@mishalavrov I’ve fixed it.
– Jacob
Nov 20 '18 at 16:42
add a comment |
Shouldn't the final answer depend on both $F$ and $N$?
– Misha Lavrov
Nov 20 '18 at 15:55
Oh I misread it as counting all unique $g_f(n)$ where $1leq n < f$. I’ll see if I can fix it and resubmit my answer.
– Jacob
Nov 20 '18 at 16:09
@mishalavrov I’ve fixed it.
– Jacob
Nov 20 '18 at 16:42
Shouldn't the final answer depend on both $F$ and $N$?
– Misha Lavrov
Nov 20 '18 at 15:55
Shouldn't the final answer depend on both $F$ and $N$?
– Misha Lavrov
Nov 20 '18 at 15:55
Oh I misread it as counting all unique $g_f(n)$ where $1leq n < f$. I’ll see if I can fix it and resubmit my answer.
– Jacob
Nov 20 '18 at 16:09
Oh I misread it as counting all unique $g_f(n)$ where $1leq n < f$. I’ll see if I can fix it and resubmit my answer.
– Jacob
Nov 20 '18 at 16:09
@mishalavrov I’ve fixed it.
– Jacob
Nov 20 '18 at 16:42
@mishalavrov I’ve fixed it.
– Jacob
Nov 20 '18 at 16:42
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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.
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%2f3006060%2fhow-many-unique-integers-to-be-obtained-by-left-lceil-fracf11n-right-rce%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