TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Does having prime neighbors make you more composite?

147 点作者 another超过 3 年前

17 条评论

6gvONxR4sf7o超过 3 年前
This is a lovely friday morning diversion. I won&#x27;t comment on the mathematical content, since the article did such an enjoyable job, but I do want to call out this slightly tangential quote:<p>&gt; Could it be that I’m the first person ever to notice the curious properties of twin tweens? No. I am past the age of entertaining such droll thoughts, even transiently. If I have not found any references, it’s doubtless because I’m not looking in the right places.<p>Ever since I read Neal Stephenson&#x27;s Anathem, this idea has stuck with me. Especially in regards to questions about who deserves the glory for creating&#x2F;popularizing things first. Vanishingly few ideas are new, and that&#x27;s okay. Journey, not destination, yada yada... What a fun write-up.
评论 #29125518 未加载
评论 #29127346 未加载
rjmunro超过 3 年前
I think of it like this. If a number n has a factor f, f cannot be a factor of n+1 or n-1 (unless f is 1, but we can ignore that for primeness). The next numbers to have f as a factor are n+f or n-f.<p>If a number n has loads of factors, all of those factors are excluded from n+1 and n-1, so there are not many numbers left to be factors of them and they are likely to be twin primes.
评论 #29122826 未加载
评论 #29124165 未加载
AnotherGoodName超过 3 年前
Oh the site is going slow but it did load.<p>&gt;Another cross reference took me off to sequence A002822, labeled “Numbers m such that 6m−1, 6m+1 are twin primes&quot;<p>Don&#x27;t focus on 6m+&#x2F;-1 alone and you&#x27;ll get it. Let me explain<p>All prime numbers above 2 are in the form of 2m + 1. ie. They are odd. So we have a formula that rules out half of numbers from being possible prime.<p>Now we can do a similar thing and create a formula to rule out factors of 2 and 3. Factors of 2 and 3 repeat every 6 numbers (the multiple of 2 and 3). eg. 6m + 0, 6m + 2 or 6m + 4 is divisible by 2. 6m + 0 or 6m + 3 is divisible by 3.<p>So all prime numbers above 3 are in the form of 6m + 1 or 6m + 5. We can write the 6m + 5 as 6m - 1 if we want. Only 2 out of 6 numbers can be prime above 3 and the numbers either side of these will have either a factor of 2 or a factor of 6. (Btw never simplify the &#x27;only 2 out of 6 numbers can be prime&#x27; as there are windows (twin primes for example) where there&#x27;s more than 1 our of 3 numbers that are prime. It&#x27;s only true that there&#x27;s never more than 2 out of 6 sequential numbers prime above 6. If you come up with a prime number theory that sets a maximum of the frequency of primes you need to consider the window size rather than a straight fraction or you&#x27;ll end up with errors).<p>Now we can do the same as above for 5. 30 is where factors of 2,3 and 5 align. All prime numbers above 30 are in the form of 30m + 1, 7, 11, 13, 17, 19, 23, 29. The rest are factors or 2,3 or 5. Only 8 out of 30 numbers above 5 can possibly be prime. All those primes are surrounded by a factor of 6 and 2 (since 6m +1&#x2F;-1 is a subset of this) or in the +1&#x2F;+29 case surrounded by a factor of 2 and a factor of 30. For the twin prime case 1&#x2F;3 of prime numbers are next to multiples of 2,3,5 and 2&#x2F;3 are next to multiples of 2,3.<p>You could do the same with 2x3x5x7 = 210. And again come up with a formula for the maximum frequency of primes (48 out of 210 numbers above 7 can possible by prime) and also a formula for where primes can occur. In this case you&#x27;d see for the twin prime case 1&#x2F;21 are next to 2x3x5x7, 6&#x2F;21 next to 2x3x5, 14&#x2F;21 next to 2x3.<p>And we can keep doing this again and again. Each time we&#x27;ll see the frequency for primes decrease and we&#x27;ll see a new possibility for an even more composite number next to a prime opening up.<p>Now we can see clearly that primes are always next to at least one composite number. As the numbers get larger and larger there&#x27;s there&#x27;s more possibility for the number next to a prime being more composite.
评论 #29125808 未加载
评论 #29122746 未加载
评论 #29123319 未加载
howmayiannoyyou超过 3 年前
Off topic, but: Reading the post title made me wonder: Does having neighbors with Amazon Prime Memberships result in getting your purchases faster even if you don&#x27;t have a membership?
评论 #29123810 未加载
roberto超过 3 年前
This is how I understand it:<p>For every 3 consecutive numbers, one of them is a multiple of 3. If a number has 2 prime neighbors there&#x27;s 100% chance it&#x27;s divisible by 3. Without prime neighbors, only 33%.<p>For 3 consecutive numbers there&#x27;s a 75% chance one of them is a multiple of 4. The number with 2 prime neighbors has then a 75% chance of being divisible by 4. A number without prime neighbors has only 25%.<p>For 5, it&#x27;s 60% vs 20%.<p>So on average we expect the numbers with prime neighbors to be more composite.
sweezyjeezy超过 3 年前
Here&#x27;s a relevant stackexchange post <a href="https:&#x2F;&#x2F;math.stackexchange.com&#x2F;questions&#x2F;3490592&#x2F;what-is-notable-about-the-composite-numbers-between-twin-primes" rel="nofollow">https:&#x2F;&#x2F;math.stackexchange.com&#x2F;questions&#x2F;3490592&#x2F;what-is-not...</a><p>TLDR - given some very reasonable (and wildly unproven) heuristics about primes, a large composite number between twin prime is expected to have approximately 2.180950 times as many divisors as usual.
评论 #29127275 未加载
ouid超过 3 年前
odds are, if you have prime neighbors, you are even.
评论 #29127462 未加载
评论 #29139615 未加载
phkahler超过 3 年前
I would like to point out that if we loosen some definitions a bit to include negative numbers, we could claim 1 and -1 as some form of &quot;primes&quot; and 0 is an integer multiple of an infinite number of primes (all of them).<p>There is something fundamental about zero that I&#x27;ve been trying to figure out how to state clearly, but haven&#x27;t been able to put in words just yet. It is closely related to the above.
评论 #29124866 未加载
评论 #29123148 未加载
dghughes超过 3 年前
&gt;Babylonian accountants and land surveyors did their arithmetic in base 60, presumably because sexagesimal num­bers help with wrangling fractions.<p>I thought the agreed theory is its due to Babylonians counting the sections of each finger? The thumb is the pointer and it&#x27;s used to touch each of the 12 sections five times over one loop per finger (thumb sections are not included). It&#x27;s also why clocks and time are base 12.
Jap2-0超过 3 年前
Just looking through the comments: a lot of people seem to be (knowingly or not) describing the Sieve of Eratosthenes.[0]<p>[0] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Sieve_of_Eratosthenes" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Sieve_of_Eratosthenes</a>
评论 #29123305 未加载
edw519超过 3 年前
A long time ago, I gave up the pursuit of Elementary Number Theory for a career in programming.<p>Thanks OP for reminding me there&#x27;s more than one way for a nerd to happy dance. Great post!
mark-r超过 3 年前
I wonder if reversing the statement is useful? Are the neighbors of a highly composite number more likely to be prime?
vgeek超过 3 年前
So should having prime neighbors be a factor when looking at multiples of properties?
curtisf超过 3 年前
Here&#x27;s one way to bolster this mathematically just a bit.<p>If you have a composite number C, you can use C to guarantee factors in larger numbers. If k is a factor of C, Cn + k also has a factor of k.<p>So, for a &quot;highly-composite&quot; C, you rule out many prime numbers. An easy way to generate these &quot;highly composite&quot; numbers is to multiple the first few primes. For example,<p>C = 2 * 3 = 6.<p>* 6n + 0 has factors of 2, 3, 6<p>* 6n + 1 may be prime (e.g. 7)<p>* 6n + 2 has factors of 2<p>* 6n + 3 has factors of 3<p>* 6n + 4 has factors of 2<p>* 6n + 5 may be prime (e.g., 17)<p>I&#x27;ll call the possibly-prime numbers C-primes. So 6n+1 and 6n+5 are 6-primes. Similarly, we have 6n+0 is a 6-tween, and 6n+2 and 6n+4 are 6-nexts (next to exactly one 6-prime), and 6n+3 is a 6-non (not adjacent to any 6-primes).<p>So, the 6-tweens have at least 2 factors, the 6-nons have at least 1 factor, and 6-nexts have at least 1 factor.<p>The number of proper divisors that a number can have is actually bounded fairly tightly [1]. For example, number numbers below 24 have more than 4 divisors; that means the 6-tween behavior predicts _three quarters_ of the divisors a number can have until 24.<p>[1]: <a href="https:&#x2F;&#x2F;terrytao.wordpress.com&#x2F;2008&#x2F;09&#x2F;23&#x2F;the-divisor-bound&#x2F;" rel="nofollow">https:&#x2F;&#x2F;terrytao.wordpress.com&#x2F;2008&#x2F;09&#x2F;23&#x2F;the-divisor-bound&#x2F;</a><p>You can use a larger C to get information for longer. For example, C = 2 * 3 * 5 = 30 gives<p>* 30n + 0 has divisors 2, 3, 5, 6, 10, 15, 30 -- tween<p>* 30n + 1 may be prime<p>* 30n + 2 has divisors 2 -- next<p>* 30n + 3 has divisors 3<p>* 30n + 4 has divisors 2<p>* 30n + 5 has divisors 5<p>* 30n + 6 has divisors 2, 3, 6 -- next<p>* 30n + 7 may be prime<p>* 30n + 8 has divisors 2 -- next<p>* 30n + 9 has divisors 3<p>* 30n + 10 has divisors 2, 5, 10 -- next<p>* 30n + 11 may be prime<p>* 30n + 12 has divisors 2, 3, 6 -- tween<p>* 30n + 13 may be prime<p>* 30n + 14 has divisors 2 -- next<p>* 30n + 15 has divisors 3, 5, 15<p>* 30n + 16 has divisors 2 -- next<p>* 30n + 17 may be prime<p>* 30n + 18 has divisors 2, 3, 6 -- tween<p>* 30n + 19 may be prime<p>* 30n + 20 has divisors 2, 5, 10 -- next<p>* 30n + 21 has divisors 3<p>* 30n + 22 has divisors 2 -- next<p>* 30n + 23 may be prime<p>* 30n + 24 has divisors 2, 3, 6 -- next<p>* 30n + 25 has divisors 5<p>* 30n + 26 has divisors 2<p>* 30n + 27 has divisors 3<p>* 30n + 28 has divisors 2 -- next<p>* 30n + 29 may be prime<p>So 30-tweens have (7, 3, 3) divisors; 30-nexts have (1, 3, 3, 1, 1, 3, 3) divisors; 30-nons have (1, 1, 1, 1, 3, 1, 1, 1, 1) divisors.<p>The first number to have more than 10 divisors is 120 (with 14), so this predicts 7 of the possible 13 divisors for numbers 30 to 120, all in tween numbers.<p>This makes the problem somewhat more concrete: why do the numbers that have many common factors with C cluster near the numbers with no common factors of C? But since we can at least observe it for different concrete C, this still does predict something about &quot;all&quot; the primes (though the effect of a particular C fades as the number of possible divisors eventually increases &gt;&gt; num. divisors of C; I posit that you can always generate a larger C to extend the pattern, but I don&#x27;t know number theory to show it)
kerblang超过 3 年前
I was actually expecting this was about Amazon collecting data on the neighbors of Prime customers by forming some composite view of not-Prime vs. Prime traffic. My knee seems to be trained to jerk in a persistent direction...
KingOfCoders超过 3 年前
Prime neighbours? 3,5,7?
intrasight超过 3 年前
I&#x27;m in #4. My neighbors are prime across the street (#3 and #5) and non-prime on my side (#2 and #6)
评论 #29121542 未加载