Are There Primes of Every Hamming Weight? - MathOverflow most recent 30 from http://mathoverflow.net 2013-06-19T21:13:42Z http://mathoverflow.net/feeds/question/22629 http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://mathoverflow.net/questions/22629/are-there-primes-of-every-hamming-weight Are There Primes of Every Hamming Weight? dakota 2010-04-26T18:29:45Z 2010-04-27T20:12:28Z <p>That is, for every integer $n \in \mathbb{Z}_{>0}$ does there exist a prime which is the sum of $n$ distinct powers of $2$?</p> <p>In this case, the <a href="http://en.wikipedia.org/wiki/Hamming_weight" rel="nofollow">Hamming weight</a> of a number is the number of $1$s in its binary expansion.</p> <p>Many problems of this sort have been considered, but perhaps not in such language. For instance, the question "Are there infinitely many <a href="http://en.wikipedia.org/wiki/Fermat_number" rel="nofollow">Fermat primes</a>?" corresponds to asking, "Are there infinitely many distinct primes with Hamming weight exactly $2$?" Also related is the question of whether there are infinitely many <a href="http://en.wikipedia.org/wiki/Mersenne_prime" rel="nofollow">Mersenne primes</a>.</p> <p>These examples suggest a class of such problems, "Do there exist infinitely many primes which are the sum of exactly $n$ distinct powers of two?"</p> <p>Since this question is open even for the $n=2$ case, I pose a much weaker question here.</p> <p>What is known is that for every $n \leq 1024$ there is such a prime.</p> <p>The smallest such prime is listed in the Online Encyclopedia of Integer Sequences <a href="http://www.research.att.com/~njas/sequences/A061712" rel="nofollow">A061712</a>.</p> <p>The number of zeros in the smallest such primes are listed in <a href="http://www.research.att.com/~njas/sequences/A110700" rel="nofollow">A110700</a>. The number of zeros in a number with a given Hamming weight is a reasonable measure of how large that number is. The conjecture at OEIS is quite a bit stronger than the question I pose.</p> <p>Is there a theorem ensuring such primes for every $n \in \mathbb{Z}_{>0}$?</p> http://mathoverflow.net/questions/22629/are-there-primes-of-every-hamming-weight/22724#22724 Answer by ogerard for Are There Primes of Every Hamming Weight? ogerard 2010-04-27T14:28:54Z 2010-04-27T14:40:47Z <p>This is not an answer but an observation.</p> <p>Let $n$ be an integer and $H(n)$ its Hamming weight.</p> <p>$H(n) &lt;= 1+ \max( { H(d) |\ d\ {\rm divisor\ of\ } n-1 })$</p> <p>in particular for $p$ a prime greater than 2</p> <p>$H(p) &lt;= 1+ \max( { H(d) |\ d\ {\rm proper\ divisor\ of }\ p-1 })$</p> <p>It could suggest ways to attack this and related questions.</p> http://mathoverflow.net/questions/22629/are-there-primes-of-every-hamming-weight/22738#22738 Answer by Ben Green for Are There Primes of Every Hamming Weight? Ben Green 2010-04-27T16:01:07Z 2010-04-27T16:20:41Z <p>Fedja is absolutely right: this has been proven, for sufficiently large $n$, by Drmota, Mauduit and Rivat.</p> <p>Although it looks at first sight as though this question is as hopeless as any other famous open problem on primes, it is easy to explain why this is not the case. Of the numbers between $1$ and $N := 2^{2n}$, the proportion whose digit sum is precisely $n$ is a constant over $\sqrt{\log N}$. These numbers are therefore quite "dense", and there is a technique in prime number theory called the method of bilinear sums (or the method of Type I/II sums) which in principle allow one to seriously think about finding primes in such a set. This is what Drmota, Mauduit and Rivat do.</p> <p>I do not believe that their method has currently been pushed as far as (for example) showing that there are infinitely many primes with no 0 when written in base 1000000. </p> <p>Let me also remark that they depend in a really weird way on some specific properties of these digit representation functions, in particular concerning the sum of the absolute values of their Fourier coefficients, which is surprisingly small. That is, it is not the case that they treat these Hamming sets as though they were "typical" sets of density $1/\sqrt{\log N}$.</p> <p>I think one might also mention a celebrated paper of Friedlander and Iwaniec, <a href="http://arxiv.org/abs/math/9811185" rel="nofollow">http://arxiv.org/abs/math/9811185</a>. In this work they prove that there are infinitely many primes of the form $x^2 + y^4$. This sequence has density just $c/N^{1/4}$ in the numbers up to $N$, so the analysis necessary to make the bilinear forms method work is really tough. Slightly later, Heath-Brown adapted their ideas to handle $x^3 + 2y^3$. Maybe that's in some sense the sparsest explicit sequence in which infinitely many primes are known (except of course for silly sequences like $s_n$ equals the first prime bigger than $2^{2^n}$).</p> <p>Finally, let me add the following: proving that, for some fixed $n$, there are infinitely many primes which are the sum of $n$ powers of two - this is almost certainly an open problem of the same kind of difficulty as Mersenne primes and so on.</p> http://mathoverflow.net/questions/22629/are-there-primes-of-every-hamming-weight/22739#22739 Answer by Felipe Voloch for Are There Primes of Every Hamming Weight? Felipe Voloch 2010-04-27T16:07:08Z 2010-04-27T16:07:08Z <p>Standard heuristics on the distribution of primes indicate that there should be infinitely many primes of each Hamming weight $h \ge 3$. If that is true, together with the fact that 2 has weight one and 3 has weight two, you get a positive answer to your question. Turning these heuristics into a proof is likely to be very impossible with current "technology". So it's quite amazing that the proof described in Ben Green's answer exists.</p> <p>Details of the heuristic. Fix a hamming weight $h \ge 3$. Let's look at integers of Hamming weight $h$ of the form $2^n + \sum_{j=1}^{h-2} 2^{a_j} + 1$, where $0 &lt; a_1 &lt; \cdots &lt; a_{h-2} &lt; n$. There are $n-1\choose{h-2}$ such integers and the probability of each of them being composite is $1-1/n\log 2$. If (BIG IF) these probabilities are independent then you expect that the probability of them all being composite is very small and you expect there to be primes of that form for infinitely many (or even all sufficiently large) $n$.</p> http://mathoverflow.net/questions/22629/are-there-primes-of-every-hamming-weight/22773#22773 Answer by Junkie for Are There Primes of Every Hamming Weight? Junkie 2010-04-27T20:12:28Z 2010-04-27T20:12:28Z <p>For this context, though not so highbrow: Wagstaff, Prime Numbers with a Fixed Number of One Bits or Zero Bits in Their Binary Representation, Experiment Math 10 (2001), 267-273.</p> <p><a href="http://www.expmath.org/restricted/10/10.2/wagstaff.ps" rel="nofollow">http://www.expmath.org/restricted/10/10.2/wagstaff.ps</a></p>