Gaussian prime spirals - MathOverflow most recent 30 from http://mathoverflow.net 2013-06-18T20:44:53Z http://mathoverflow.net/feeds/question/91423 http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://mathoverflow.net/questions/91423/gaussian-prime-spirals Gaussian prime spirals Joseph O'Rourke 2012-03-16T22:26:08Z 2013-02-17T01:03:10Z <p>Imagine a particle in the complex plane, starting at $c_0$, a <a href="http://en.wikipedia.org/wiki/Gaussian_integer" rel="nofollow">Gaussian integer</a>, moving initially $\pm$ in the horizontal or vertical directions. When it hits a <a href="http://en.wikipedia.org/wiki/Gaussian_prime#As_a_unique_factorization_domain" rel="nofollow">Gaussian prime</a>, it turns left $90^\circ$. For example, starting at $12 - 7 i$, moving initially $+x$, this closed circuit results: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="http://cs.smith.edu/~orourke/MathOverflow/12_-7i.jpg" alt="12 - 7i"><br /> Instead, starting at $3+5 i$, again $+x$, this (pleasingly symmetric!) closed cycle results: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="http://cs.smith.edu/~orourke/MathOverflow/3_5i.jpg" alt="3 + 5i"><br /> Here's another (added later), starting at $5+23 i$: <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="http://cs.smith.edu/~orourke/MathOverflow/5_23i.jpg" alt="5 + 23i"><br /> (Gaussian primes $a+bi$ off-axes have $a^2+b^2$ prime; on axis, $\pm(4n+3)$ prime.)<br /> My question is,</p> <blockquote> <p><b>Q0</b>.<em>What's going on?</em></p> </blockquote> <p>More specifically,</p> <blockquote> <p><b>Q1</b>. Does the spiral always form a cycle?</p> <p><b>Q2</b>. Have these spirals been investigated previously?</p> </blockquote> <p>(I am about to step on a plane; apologies for not acknowledging responses!) ...<em>Later:</em></p> <blockquote> <p><b>Q3</b>. Under what conditions is the spiral (assuming it closes) symmetric w.r.t. reflection in a horizontal (as is $12-7 i$), or reflection in a vertical (as is $5 + 23 i$), or reflection in both (as is $3 + 5i$)?</p> </blockquote> http://mathoverflow.net/questions/91423/gaussian-prime-spirals/91446#91446 Answer by unknown (google) for Gaussian prime spirals unknown (google) 2012-03-17T05:28:24Z 2012-03-17T06:06:41Z <p>Agreed, nice spirals. This is not meant as a complete answer. Heuristically and experimentally, it is very likely that there are infinitely many $x,y\in\mathbb{Z}$ such that $x^2+y^2$, $(x+2)^2+y^2$, $x^2+(y+2)^2$ and $(x+2)^2+(y+2)^2$ are simultaneously prime. (For example, PARI gave $136$ such $(x,y)$ with $1\leq x,y\leq 1000$ and $1330$ such $(x,y)$ with $1\leq x,y \leq 5000$.) Such a result will give Gaussian primes at the corners of a square of side length two and hence infinitely many of the simplest type of cycle. Though it may not directly solve your question, it should be noted that you do get infinitely many squares with Gaussian primes at the corners if you allow the lengths of the sides of the squares to vary, due to the following result:</p> <p>T. Tao, <a href="http://arxiv.org/abs/math/0501314" rel="nofollow">The Gaussian primes contain arbitrarily shaped constellations</a>, J. d.Analyse Mathematique 99 (2006), 109--176.</p> <p>Also, heuristically, if you believe the kind of heuristics behind the Hardy-Littlewood $k$-tuple conjecture, the same kind of reasoning should give you the conjectural asymptotics for </p> <p><code>$$\sum_{\substack{x,y\in \mathbb{Z}\\1 \leq x,y\leq N}}\Lambda(x^2+y^2)\Lambda((x+2)^2+y^2)\Lambda(x^2+(y+2)^2)\Lambda((x+2)^2+(y+2)^2).$$</code></p> http://mathoverflow.net/questions/91423/gaussian-prime-spirals/91447#91447 Answer by Greg Martin for Gaussian prime spirals Greg Martin 2012-03-17T06:58:06Z 2012-03-17T06:58:06Z <p>Note that if you start above the real axis, and then one of the steps takes you below the real axis, then the subsequent path will be the mirror image (complex conjugate) of the start of the path. In your second picture, this accounts for the whole left half of the spiral (starting at $3+5i$ and pausing at $3-5i$). Then, if the continuation happens to cross the real axis again, the rest of the path will close up into a closed loop. (This ignores the case where the point on the real axis itself is a Gaussian prime.)</p> <p>So your question has to do with the (equally mysterious) question of when such paths will hit Gaussian primes of the form $m+ni$ where none of $m$, $m+i$, ..., $m+(n-1)i$ are prime.</p> http://mathoverflow.net/questions/91423/gaussian-prime-spirals/91548#91548 Answer by Barry Cipra for Gaussian prime spirals Barry Cipra 2012-03-18T16:09:25Z 2012-03-19T06:45:31Z <p>Expanding slightly on Greg Martin's answer, the symmetry applies across the imaginary axis as well as the real axis, so the only way a path can avoid closing up is if it crosses at most one axis at most once (and if it does cross an axis, the path -- if extended in the backward as well as forward direction -- will be mirror symmetric with respect to the axis it crosses). Note that within a quadrant the horizontal (respectively vertical) steps are alternately toward and away from the imaginary (respectively real) axis. </p> <p>Intuitively the steps, on average, get larger the further you are from the axes. So if you're in the first quadrant and take a step to the right and then a step up, you expect your next step, to the left, to be somewhat larger than your previous step to the right (and similarly with the next step down, assuming you're still in the first quadrant). So in a sense the axes are exerting kind of a gravitational tug on sort of a random walk. Of course, nothing of the sort is literally going on. Still, it seems hard to imagine the stars (I mean Gaussian primes) aligning to keep a random walk going in perpetuity.</p> <p>It seems more likely one might encounter closed paths that don't have any nice symmetry, such as $$(a,b) \rightarrow (a+4,b) \rightarrow (a+4,b+8) \rightarrow (a-2,b+8) \rightarrow$$ $$(a-2,b+4) \rightarrow (a+2,b+4) \rightarrow (a+2,b+6) \rightarrow (a,b+6) \rightarrow (a,b)$$ <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="http://cs.smith.edu/~orourke/MathOverflow/BarryCycle.jpg" alt="Barry Cycle"><br /> (Sorry, if someone could replace that with a picture, that would be helpful.) As "unknown" pointed out, there are certainly closed square paths that stay in the first quadrant. There are also rectangles, such as the $2\times4$ rectangle with $8+13i$ for its lower left hand corner and the $2\times6$ one starting at $14+19i$. (I spotted these in a picture of Gaussian primes of norm less than 1000 in the paper <a href="http://mathdl.maa.org/images/upload_library/22/Chauvenet/GethnerWagonWick.pdf" rel="nofollow">"A Stroll Through the Gaussian Primes"</a> by Gethner, Wagon, and Wick.) One might expect a souped-up (supped-up?) $k$-tuple conjecture to predict the existence of any closed-path pattern that isn't forbidden by the usual suspects. (Part of the souping up, though, is that not only are there primes at the specified corners, but everything else along the edges is composite.)</p> <p>All in all, a nice problem -- and the spirals, reminiscient of Celtic knots, are really lovely!</p> http://mathoverflow.net/questions/91423/gaussian-prime-spirals/92073#92073 Answer by Joseph O'Rourke for Gaussian prime spirals Joseph O'Rourke 2012-03-24T12:25:43Z 2012-03-24T12:49:11Z <p>Just for your amusement, here is a spiral of length 2,956 primes that crosses just one axis, and hits no prime on that axis. I encountered it twice, once in a horizontal orientation (seed: $12+28 i$) and once in a vertical orientation (seed: $43 + 55 i$). That it should occur twice is a consequence of the symmetry of the conditions that render a Gaussian integer prime. <br /> <img src="http://cs.smith.edu/~orourke/MathOverflow/GSpiral1.jpg" alt="Horiz Spiral"> <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <img src="http://cs.smith.edu/~orourke/MathOverflow/GSpiral2.jpg" alt="alt text"></p> http://mathoverflow.net/questions/91423/gaussian-prime-spirals/92558#92558 Answer by Joseph O'Rourke for Gaussian prime spirals Joseph O'Rourke 2012-03-29T12:03:14Z 2013-02-17T01:03:10Z <p>Stan Wagon, coauthor of the award-winning article "<a href="http://mathdl.maa.org/mathDL/22/?pa=content&amp;sa=viewDocument&amp;nodeId=3069" rel="nofollow">A Stroll through the Gaussian Primes</a>," became intrigued, and sent me these two stunning images. The first is a different rendering of the 2,956-cycle I posted earlier: <br /> &nbsp;<img src="http://cs.smith.edu/~orourke/MathOverflow/RedYellowCycle.jpg" alt="Polygon Cycle" /> <br /> The second is a Rorschach-like cycle of 316,268 primes he found: <br /> &nbsp;<img src="http://cs.smith.edu/~orourke/MathOverflow/RorschachCycle.jpg" alt="Rorschach Cycle" /> <br /> (seed: $232+277 i$). [Apologies for the loss of resolution converting for this forum.]</p> <p>Soon there will be a <em>Mathematica Demonstration Project</em> on this topic; it currently awaits approval.</p> <p><b>Update</b>. The Mathematica Demo is available <a href="http://demonstrations.wolfram.com/GaussianPrimeSpirals/" rel="nofollow">at this link</a>: <br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <img src="http://cs.smith.edu/~orourke/MathOverflow/GPrimeSpiralMmaDemo.jpg" alt="Mma Demo" /><br /> Using a modification of this code, Stan has found a cycle of length 3,900,404. Seed: $107 + 992 i$. <hr /> (<em>16Feb13</em>): Stan Wagon worked with Walter Stromquist, the editor of <em><a href="http://www.maa.org/pubs/mathmag.html" rel="nofollow">Mathematics Magazine</a></em>, on the cover of the February 2013 issue, which displays the spiral immediately above: <br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <img src="http://cs.smith.edu/~orourke/MathOverflow/MMFeb13cover.jpg" alt="MathMagCover" /><br /></p>