Natural density of set ${4^nk}$, where $k$ is odd











up vote
5
down vote

favorite
2












A starting point is this problem: $P subset Z_n = {1, 2, dots, n}$ is binary, if there exists a number $k$ such that both $k in P$ and $2k in P$, otherwise it is antibinary. One is supposed, for given $n$, to show antibinary set with maximum amount of elements (there might be many sets satisfying this property). One can show that set $P_n = {4^m(2k + 1) mid m, k in mathbb{N}} cap Z_n$ is a proper solution. My question is: how big is this set? I'm looking for $displaystylelim_{n to infty} p_n$, where $p_n = dfrac{|P_n|}{n}$. Simple program I wrote in Python suggests that the answer is $dfrac{2}{3}$, but I don't know, how to prove it.










share|cite|improve this question
























  • This set contains only about $frac{n}{2}$ elements, it is not an optimal solution.
    – Rakaho
    Nov 18 at 20:41










  • I make it $frac n6$ but do not see immediately why that is not optimal.
    – Ross Millikan
    Nov 19 at 5:10















up vote
5
down vote

favorite
2












A starting point is this problem: $P subset Z_n = {1, 2, dots, n}$ is binary, if there exists a number $k$ such that both $k in P$ and $2k in P$, otherwise it is antibinary. One is supposed, for given $n$, to show antibinary set with maximum amount of elements (there might be many sets satisfying this property). One can show that set $P_n = {4^m(2k + 1) mid m, k in mathbb{N}} cap Z_n$ is a proper solution. My question is: how big is this set? I'm looking for $displaystylelim_{n to infty} p_n$, where $p_n = dfrac{|P_n|}{n}$. Simple program I wrote in Python suggests that the answer is $dfrac{2}{3}$, but I don't know, how to prove it.










share|cite|improve this question
























  • This set contains only about $frac{n}{2}$ elements, it is not an optimal solution.
    – Rakaho
    Nov 18 at 20:41










  • I make it $frac n6$ but do not see immediately why that is not optimal.
    – Ross Millikan
    Nov 19 at 5:10













up vote
5
down vote

favorite
2









up vote
5
down vote

favorite
2






2





A starting point is this problem: $P subset Z_n = {1, 2, dots, n}$ is binary, if there exists a number $k$ such that both $k in P$ and $2k in P$, otherwise it is antibinary. One is supposed, for given $n$, to show antibinary set with maximum amount of elements (there might be many sets satisfying this property). One can show that set $P_n = {4^m(2k + 1) mid m, k in mathbb{N}} cap Z_n$ is a proper solution. My question is: how big is this set? I'm looking for $displaystylelim_{n to infty} p_n$, where $p_n = dfrac{|P_n|}{n}$. Simple program I wrote in Python suggests that the answer is $dfrac{2}{3}$, but I don't know, how to prove it.










share|cite|improve this question















A starting point is this problem: $P subset Z_n = {1, 2, dots, n}$ is binary, if there exists a number $k$ such that both $k in P$ and $2k in P$, otherwise it is antibinary. One is supposed, for given $n$, to show antibinary set with maximum amount of elements (there might be many sets satisfying this property). One can show that set $P_n = {4^m(2k + 1) mid m, k in mathbb{N}} cap Z_n$ is a proper solution. My question is: how big is this set? I'm looking for $displaystylelim_{n to infty} p_n$, where $p_n = dfrac{|P_n|}{n}$. Simple program I wrote in Python suggests that the answer is $dfrac{2}{3}$, but I don't know, how to prove it.







sequences-and-series elementary-number-theory






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Nov 18 at 22:01









Fabio Lucchini

7,77311326




7,77311326










asked Nov 18 at 20:19









Rakaho

554




554












  • This set contains only about $frac{n}{2}$ elements, it is not an optimal solution.
    – Rakaho
    Nov 18 at 20:41










  • I make it $frac n6$ but do not see immediately why that is not optimal.
    – Ross Millikan
    Nov 19 at 5:10


















  • This set contains only about $frac{n}{2}$ elements, it is not an optimal solution.
    – Rakaho
    Nov 18 at 20:41










  • I make it $frac n6$ but do not see immediately why that is not optimal.
    – Ross Millikan
    Nov 19 at 5:10
















This set contains only about $frac{n}{2}$ elements, it is not an optimal solution.
– Rakaho
Nov 18 at 20:41




This set contains only about $frac{n}{2}$ elements, it is not an optimal solution.
– Rakaho
Nov 18 at 20:41












I make it $frac n6$ but do not see immediately why that is not optimal.
– Ross Millikan
Nov 19 at 5:10




I make it $frac n6$ but do not see immediately why that is not optimal.
– Ross Millikan
Nov 19 at 5:10










2 Answers
2






active

oldest

votes

















up vote
3
down vote



accepted










Since $4^m (2k+1)leq n $ if and only if $kleqfrac {n/4^m-1}{2}$, we have
begin{align}
frac {P (n)}n
&=frac 1nsum_{m=0}^{lfloorlog_4(m)rfloor}leftlfloor 1+frac {n/4^m-1}{2}rightrfloor\
&=frac 1nsum_{m=0}^{lfloorlog_4(m)rfloor}leftlfloorfrac {n+4^m}{2cdot 4^m}rightrfloor\
&=frac 1nsum_{m=0}^{lfloorlog_4(m)rfloor}frac {n+4^m}{2cdot 4^m}+Oleft(frac {log (n)}nright)\
&=frac 12sum_{m=0}^{lfloorlog_4(m)rfloor}frac 1{4^m}+Oleft(frac {log (n)}nright)\
&=frac 23left(1-4^{-1-lfloorlog_4 (n)rfloor}right)+Oleft(frac {log (n)}nright)\
&xrightarrow {ntoinfty}frac 23
end{align}






share|cite|improve this answer























  • @Ross Millikan: As pointed out by Rakaho, the sum starts with $1$ (i.e. $m=0$).
    – Fabio Lucchini
    Nov 19 at 8:03


















up vote
1
down vote













Roughly $frac 12$ of the numbers are of the form $2k+1$, $frac 18$ of the numbers are of the form $8k+4$, $frac 1{32}$ of the numbers are of the form $32k+16$, $frac 1{128}$ are of the form $128k+64$, so the density is
$$frac 12left(1+frac 14+frac 1{16}+ldotsright)=frac 18 cdot frac 1{1-frac 14}=frac 23$$






share|cite|improve this answer























  • $m$ could be 0, so you're omitting all odd numbers
    – Rakaho
    Nov 19 at 6:54













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',
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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3004068%2fnatural-density-of-set-4nk-where-k-is-odd%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
3
down vote



accepted










Since $4^m (2k+1)leq n $ if and only if $kleqfrac {n/4^m-1}{2}$, we have
begin{align}
frac {P (n)}n
&=frac 1nsum_{m=0}^{lfloorlog_4(m)rfloor}leftlfloor 1+frac {n/4^m-1}{2}rightrfloor\
&=frac 1nsum_{m=0}^{lfloorlog_4(m)rfloor}leftlfloorfrac {n+4^m}{2cdot 4^m}rightrfloor\
&=frac 1nsum_{m=0}^{lfloorlog_4(m)rfloor}frac {n+4^m}{2cdot 4^m}+Oleft(frac {log (n)}nright)\
&=frac 12sum_{m=0}^{lfloorlog_4(m)rfloor}frac 1{4^m}+Oleft(frac {log (n)}nright)\
&=frac 23left(1-4^{-1-lfloorlog_4 (n)rfloor}right)+Oleft(frac {log (n)}nright)\
&xrightarrow {ntoinfty}frac 23
end{align}






share|cite|improve this answer























  • @Ross Millikan: As pointed out by Rakaho, the sum starts with $1$ (i.e. $m=0$).
    – Fabio Lucchini
    Nov 19 at 8:03















up vote
3
down vote



accepted










Since $4^m (2k+1)leq n $ if and only if $kleqfrac {n/4^m-1}{2}$, we have
begin{align}
frac {P (n)}n
&=frac 1nsum_{m=0}^{lfloorlog_4(m)rfloor}leftlfloor 1+frac {n/4^m-1}{2}rightrfloor\
&=frac 1nsum_{m=0}^{lfloorlog_4(m)rfloor}leftlfloorfrac {n+4^m}{2cdot 4^m}rightrfloor\
&=frac 1nsum_{m=0}^{lfloorlog_4(m)rfloor}frac {n+4^m}{2cdot 4^m}+Oleft(frac {log (n)}nright)\
&=frac 12sum_{m=0}^{lfloorlog_4(m)rfloor}frac 1{4^m}+Oleft(frac {log (n)}nright)\
&=frac 23left(1-4^{-1-lfloorlog_4 (n)rfloor}right)+Oleft(frac {log (n)}nright)\
&xrightarrow {ntoinfty}frac 23
end{align}






share|cite|improve this answer























  • @Ross Millikan: As pointed out by Rakaho, the sum starts with $1$ (i.e. $m=0$).
    – Fabio Lucchini
    Nov 19 at 8:03













up vote
3
down vote



accepted







up vote
3
down vote



accepted






Since $4^m (2k+1)leq n $ if and only if $kleqfrac {n/4^m-1}{2}$, we have
begin{align}
frac {P (n)}n
&=frac 1nsum_{m=0}^{lfloorlog_4(m)rfloor}leftlfloor 1+frac {n/4^m-1}{2}rightrfloor\
&=frac 1nsum_{m=0}^{lfloorlog_4(m)rfloor}leftlfloorfrac {n+4^m}{2cdot 4^m}rightrfloor\
&=frac 1nsum_{m=0}^{lfloorlog_4(m)rfloor}frac {n+4^m}{2cdot 4^m}+Oleft(frac {log (n)}nright)\
&=frac 12sum_{m=0}^{lfloorlog_4(m)rfloor}frac 1{4^m}+Oleft(frac {log (n)}nright)\
&=frac 23left(1-4^{-1-lfloorlog_4 (n)rfloor}right)+Oleft(frac {log (n)}nright)\
&xrightarrow {ntoinfty}frac 23
end{align}






share|cite|improve this answer














Since $4^m (2k+1)leq n $ if and only if $kleqfrac {n/4^m-1}{2}$, we have
begin{align}
frac {P (n)}n
&=frac 1nsum_{m=0}^{lfloorlog_4(m)rfloor}leftlfloor 1+frac {n/4^m-1}{2}rightrfloor\
&=frac 1nsum_{m=0}^{lfloorlog_4(m)rfloor}leftlfloorfrac {n+4^m}{2cdot 4^m}rightrfloor\
&=frac 1nsum_{m=0}^{lfloorlog_4(m)rfloor}frac {n+4^m}{2cdot 4^m}+Oleft(frac {log (n)}nright)\
&=frac 12sum_{m=0}^{lfloorlog_4(m)rfloor}frac 1{4^m}+Oleft(frac {log (n)}nright)\
&=frac 23left(1-4^{-1-lfloorlog_4 (n)rfloor}right)+Oleft(frac {log (n)}nright)\
&xrightarrow {ntoinfty}frac 23
end{align}







share|cite|improve this answer














share|cite|improve this answer



share|cite|improve this answer








edited Nov 19 at 8:01

























answered Nov 18 at 22:26









Fabio Lucchini

7,77311326




7,77311326












  • @Ross Millikan: As pointed out by Rakaho, the sum starts with $1$ (i.e. $m=0$).
    – Fabio Lucchini
    Nov 19 at 8:03


















  • @Ross Millikan: As pointed out by Rakaho, the sum starts with $1$ (i.e. $m=0$).
    – Fabio Lucchini
    Nov 19 at 8:03
















@Ross Millikan: As pointed out by Rakaho, the sum starts with $1$ (i.e. $m=0$).
– Fabio Lucchini
Nov 19 at 8:03




@Ross Millikan: As pointed out by Rakaho, the sum starts with $1$ (i.e. $m=0$).
– Fabio Lucchini
Nov 19 at 8:03










up vote
1
down vote













Roughly $frac 12$ of the numbers are of the form $2k+1$, $frac 18$ of the numbers are of the form $8k+4$, $frac 1{32}$ of the numbers are of the form $32k+16$, $frac 1{128}$ are of the form $128k+64$, so the density is
$$frac 12left(1+frac 14+frac 1{16}+ldotsright)=frac 18 cdot frac 1{1-frac 14}=frac 23$$






share|cite|improve this answer























  • $m$ could be 0, so you're omitting all odd numbers
    – Rakaho
    Nov 19 at 6:54

















up vote
1
down vote













Roughly $frac 12$ of the numbers are of the form $2k+1$, $frac 18$ of the numbers are of the form $8k+4$, $frac 1{32}$ of the numbers are of the form $32k+16$, $frac 1{128}$ are of the form $128k+64$, so the density is
$$frac 12left(1+frac 14+frac 1{16}+ldotsright)=frac 18 cdot frac 1{1-frac 14}=frac 23$$






share|cite|improve this answer























  • $m$ could be 0, so you're omitting all odd numbers
    – Rakaho
    Nov 19 at 6:54















up vote
1
down vote










up vote
1
down vote









Roughly $frac 12$ of the numbers are of the form $2k+1$, $frac 18$ of the numbers are of the form $8k+4$, $frac 1{32}$ of the numbers are of the form $32k+16$, $frac 1{128}$ are of the form $128k+64$, so the density is
$$frac 12left(1+frac 14+frac 1{16}+ldotsright)=frac 18 cdot frac 1{1-frac 14}=frac 23$$






share|cite|improve this answer














Roughly $frac 12$ of the numbers are of the form $2k+1$, $frac 18$ of the numbers are of the form $8k+4$, $frac 1{32}$ of the numbers are of the form $32k+16$, $frac 1{128}$ are of the form $128k+64$, so the density is
$$frac 12left(1+frac 14+frac 1{16}+ldotsright)=frac 18 cdot frac 1{1-frac 14}=frac 23$$







share|cite|improve this answer














share|cite|improve this answer



share|cite|improve this answer








edited Nov 19 at 14:46

























answered Nov 19 at 1:09









Ross Millikan

288k23195365




288k23195365












  • $m$ could be 0, so you're omitting all odd numbers
    – Rakaho
    Nov 19 at 6:54




















  • $m$ could be 0, so you're omitting all odd numbers
    – Rakaho
    Nov 19 at 6:54


















$m$ could be 0, so you're omitting all odd numbers
– Rakaho
Nov 19 at 6:54






$m$ could be 0, so you're omitting all odd numbers
– Rakaho
Nov 19 at 6:54




















draft saved

draft discarded




















































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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3004068%2fnatural-density-of-set-4nk-where-k-is-odd%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

Ellipse (mathématiques)

Quarter-circle Tiles

Mont Emei