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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Primes and Primality Testing

44 点作者 animeshk超过 7 年前

6 条评论

hannob超过 7 年前
&quot;There&#x27;s no slick trick to check fast enough, whether or not a large number is prime. So much so that finding large prime numbers is one of the most challenging aspects of mathematics and computing.<p>This very fact, that large prime numbers are hard to find, is the basis of cryptography which is fundamental to cyber security.&quot;<p>That is simply flat out wrong.<p>What they probably are referring to is RSA. However the basis of RSA is not that it&#x27;s hard to find a large prime number. (Actually if that would be hard then RSA would be impossible, as it needs large primes for key generation.) The basis is that it&#x27;s hard to factorize a composite number.
评论 #15729284 未加载
评论 #15729467 未加载
btilly超过 7 年前
There is a mistake in the description of the Rabin-Miller test.<p>The test itself is deterministic. If you try it for more than half of the numbers in the range, it gives you an exact answer.<p>In practice we run it as a probabilistic test because we don&#x27;t want to test all of those numbers. :-)
评论 #15729511 未加载
coldcode超过 7 年前
Primes have always fascinated me despite not being a mathematician. Counting numbers are regular yet the pattern of primes seems not to be (although there is a way of plotting them that makes pretty spiral like structures).
评论 #15729171 未加载
评论 #15729189 未加载
slitaz超过 7 年前
Has typos.<p>Says that 199^883467 is difficult to factorise. Well, all 883467 factors are shown already.
评论 #15729340 未加载
finchisko超过 7 年前
It might be late and me being tired, but isPrime function will return false for 1 and any other prime? Shouldn&#x27;t it be true when function is called isPrime?
评论 #15729568 未加载
mbid超过 7 年前
The two definitions of primality given in the beginning of the article are not equivalent -- one rules out 1, the other one doesn&#x27;t.
评论 #15729097 未加载