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











up vote
4
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
    16 hours ago










  • I make it $frac n6$ but do not see immediately why that is not optimal.
    – Ross Millikan
    8 hours ago















up vote
4
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
    16 hours ago










  • I make it $frac n6$ but do not see immediately why that is not optimal.
    – Ross Millikan
    8 hours ago













up vote
4
down vote

favorite
2









up vote
4
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 15 hours ago









Fabio Lucchini

7,60511226




7,60511226










asked 17 hours ago









Rakaho

504




504












  • This set contains only about $frac{n}{2}$ elements, it is not an optimal solution.
    – Rakaho
    16 hours ago










  • I make it $frac n6$ but do not see immediately why that is not optimal.
    – Ross Millikan
    8 hours ago


















  • This set contains only about $frac{n}{2}$ elements, it is not an optimal solution.
    – Rakaho
    16 hours ago










  • I make it $frac n6$ but do not see immediately why that is not optimal.
    – Ross Millikan
    8 hours ago
















This set contains only about $frac{n}{2}$ elements, it is not an optimal solution.
– Rakaho
16 hours ago




This set contains only about $frac{n}{2}$ elements, it is not an optimal solution.
– Rakaho
16 hours ago












I make it $frac n6$ but do not see immediately why that is not optimal.
– Ross Millikan
8 hours ago




I make it $frac n6$ but do not see immediately why that is not optimal.
– Ross Millikan
8 hours ago










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























  • You lost a factor $frac 14$ when you went from the next to last equality to the last one. The sum starts with $frac 14$, not with $1$. That turns your $frac 23$ into my $frac 16$. Please see my start to the set and indicate what other numbers should be there or why the density increases dramatically later on.
    – Ross Millikan
    8 hours ago










  • @Ross Millikan: As pointed out by Rakaho, the sum starts with $1$ (i.e. $m=0$).
    – Fabio Lucchini
    5 hours ago


















up vote
0
down vote













The set begins $${4,12,16,20,28,36,44,48,52,60,64,ldots }$$ The density is much less than $frac 23.$



Roughly $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 18left(1+frac 14+frac 1{16}+ldotsright)=frac 18 cdot frac 1{1-frac 14}=frac 16$$






share|cite|improve this answer





















  • $m$ could be 0, so you're omitting all odd numbers
    – Rakaho
    6 hours ago













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























  • You lost a factor $frac 14$ when you went from the next to last equality to the last one. The sum starts with $frac 14$, not with $1$. That turns your $frac 23$ into my $frac 16$. Please see my start to the set and indicate what other numbers should be there or why the density increases dramatically later on.
    – Ross Millikan
    8 hours ago










  • @Ross Millikan: As pointed out by Rakaho, the sum starts with $1$ (i.e. $m=0$).
    – Fabio Lucchini
    5 hours ago















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























  • You lost a factor $frac 14$ when you went from the next to last equality to the last one. The sum starts with $frac 14$, not with $1$. That turns your $frac 23$ into my $frac 16$. Please see my start to the set and indicate what other numbers should be there or why the density increases dramatically later on.
    – Ross Millikan
    8 hours ago










  • @Ross Millikan: As pointed out by Rakaho, the sum starts with $1$ (i.e. $m=0$).
    – Fabio Lucchini
    5 hours ago













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 5 hours ago

























answered 15 hours ago









Fabio Lucchini

7,60511226




7,60511226












  • You lost a factor $frac 14$ when you went from the next to last equality to the last one. The sum starts with $frac 14$, not with $1$. That turns your $frac 23$ into my $frac 16$. Please see my start to the set and indicate what other numbers should be there or why the density increases dramatically later on.
    – Ross Millikan
    8 hours ago










  • @Ross Millikan: As pointed out by Rakaho, the sum starts with $1$ (i.e. $m=0$).
    – Fabio Lucchini
    5 hours ago


















  • You lost a factor $frac 14$ when you went from the next to last equality to the last one. The sum starts with $frac 14$, not with $1$. That turns your $frac 23$ into my $frac 16$. Please see my start to the set and indicate what other numbers should be there or why the density increases dramatically later on.
    – Ross Millikan
    8 hours ago










  • @Ross Millikan: As pointed out by Rakaho, the sum starts with $1$ (i.e. $m=0$).
    – Fabio Lucchini
    5 hours ago
















You lost a factor $frac 14$ when you went from the next to last equality to the last one. The sum starts with $frac 14$, not with $1$. That turns your $frac 23$ into my $frac 16$. Please see my start to the set and indicate what other numbers should be there or why the density increases dramatically later on.
– Ross Millikan
8 hours ago




You lost a factor $frac 14$ when you went from the next to last equality to the last one. The sum starts with $frac 14$, not with $1$. That turns your $frac 23$ into my $frac 16$. Please see my start to the set and indicate what other numbers should be there or why the density increases dramatically later on.
– Ross Millikan
8 hours ago












@Ross Millikan: As pointed out by Rakaho, the sum starts with $1$ (i.e. $m=0$).
– Fabio Lucchini
5 hours ago




@Ross Millikan: As pointed out by Rakaho, the sum starts with $1$ (i.e. $m=0$).
– Fabio Lucchini
5 hours ago










up vote
0
down vote













The set begins $${4,12,16,20,28,36,44,48,52,60,64,ldots }$$ The density is much less than $frac 23.$



Roughly $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 18left(1+frac 14+frac 1{16}+ldotsright)=frac 18 cdot frac 1{1-frac 14}=frac 16$$






share|cite|improve this answer





















  • $m$ could be 0, so you're omitting all odd numbers
    – Rakaho
    6 hours ago

















up vote
0
down vote













The set begins $${4,12,16,20,28,36,44,48,52,60,64,ldots }$$ The density is much less than $frac 23.$



Roughly $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 18left(1+frac 14+frac 1{16}+ldotsright)=frac 18 cdot frac 1{1-frac 14}=frac 16$$






share|cite|improve this answer





















  • $m$ could be 0, so you're omitting all odd numbers
    – Rakaho
    6 hours ago















up vote
0
down vote










up vote
0
down vote









The set begins $${4,12,16,20,28,36,44,48,52,60,64,ldots }$$ The density is much less than $frac 23.$



Roughly $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 18left(1+frac 14+frac 1{16}+ldotsright)=frac 18 cdot frac 1{1-frac 14}=frac 16$$






share|cite|improve this answer












The set begins $${4,12,16,20,28,36,44,48,52,60,64,ldots }$$ The density is much less than $frac 23.$



Roughly $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 18left(1+frac 14+frac 1{16}+ldotsright)=frac 18 cdot frac 1{1-frac 14}=frac 16$$







share|cite|improve this answer












share|cite|improve this answer



share|cite|improve this answer










answered 12 hours ago









Ross Millikan

287k23195364




287k23195364












  • $m$ could be 0, so you're omitting all odd numbers
    – Rakaho
    6 hours ago




















  • $m$ could be 0, so you're omitting all odd numbers
    – Rakaho
    6 hours ago


















$m$ could be 0, so you're omitting all odd numbers
– Rakaho
6 hours ago






$m$ could be 0, so you're omitting all odd numbers
– Rakaho
6 hours ago




















 

draft saved


draft discarded



















































 


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

MongoDB - Not Authorized To Execute Command

How to fix TextFormField cause rebuild widget in Flutter

in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith