素数有规则吗?

时间:2022-08-16 11:23:37

I've passed by this article: http://gauravtiwari.org/2011/12/11/claim-for-a-prime-number-formula/

我已经通过了这篇文章:http://gauravtiwari.org/2011/12/11/claim-for-a-prime-number-formula/

and this paper: http://www.m-hikari.com/ams/ams-2012/ams-73-76-2012/kaddouraAMS73-76-2012.pdf

和本文:http://www.m-hikari.com/ams/ams-2012/ams-73-76-2012/kaddouraAMS73-76-2012.pdf

They say that there is a formula that when I give it (n) then it returns nth prime number. Where in other articles they say that no formula discovered so far that does such thing.

他们说有一个公式,当我给它(n)然后它返回第n个素数。在其他文章中,他们说迄今为止没有发现任何公式可以做到这一点。

If the formula exists indeed, then why from time to time they discover the largest prime number known ever, It would be very simple using the formula to find a larger one.

如果公式确实存在,那么为什么他们不时会发现有史以来最大的素数,使用公式找到一个更大的素数将非常简单。

I just want to ensure that such formula exists or not.

我只是想确保这样的公式存在与否。

1 个解决方案

#1


1  

Conceptually it is very simple to test that a given number n is a prime number: just check for all smaller numbers 'm' (larger than 1) whether 'm' divides 'n' without remainder. If such an 'm' exists 'n' is not a prime number.

从概念上讲,测试给定数字n是素数是非常简单的:只检查所有较小数字'm'(大于1)是否'm'除以'n'而没有余数。如果这样的'm'存在'n'不是素数。

Then, to find the k-th prime number you just iterate this procedure until you found the k-th number which is a prime. So yes, such a formula exists.

然后,为了找到第k个素数,你只需迭代这个过程,直到找到第k个数为素数的数。是的,存在这样的公式。

But, executing the above procedure is very inefficient. So even having this formula (and in real cases you would use more intelligent variants), it can take literally ages before you get an answer. And that is why more efficient variants and tricks are used to find large prime numbers.

但是,执行上述过程效率非常低。因此,即使有这个公式(在实际情况下,你会使用更智能的变体),在得到答案之前,它可能需要很长时间。这就是为什么使用更有效的变体和技巧来寻找大质数的原因。

#1


1  

Conceptually it is very simple to test that a given number n is a prime number: just check for all smaller numbers 'm' (larger than 1) whether 'm' divides 'n' without remainder. If such an 'm' exists 'n' is not a prime number.

从概念上讲,测试给定数字n是素数是非常简单的:只检查所有较小数字'm'(大于1)是否'm'除以'n'而没有余数。如果这样的'm'存在'n'不是素数。

Then, to find the k-th prime number you just iterate this procedure until you found the k-th number which is a prime. So yes, such a formula exists.

然后,为了找到第k个素数,你只需迭代这个过程,直到找到第k个数为素数的数。是的,存在这样的公式。

But, executing the above procedure is very inefficient. So even having this formula (and in real cases you would use more intelligent variants), it can take literally ages before you get an answer. And that is why more efficient variants and tricks are used to find large prime numbers.

但是,执行上述过程效率非常低。因此,即使有这个公式(在实际情况下,你会使用更智能的变体),在得到答案之前,它可能需要很长时间。这就是为什么使用更有效的变体和技巧来寻找大质数的原因。