Talk:Formula for primes
Formulas that frequently produce primes
Do you know of any other formulas that produce primes so frequently?? Name some. User:66.32.255.166
- Try Prime number and the section "Formulas yielding prime numbers" which has some. It is rather better than this page, so I will copy the content from there to here. --Henrygb 00:41, 7 May 2004 (UTC)
Reversion of changes by an anon
I've reverted all the changes by this anon guy. He keeps adding info to articles when it's been moved from one article to another, and he also has been deleting/altering comments on talk pages. CryptoDerk 03:14, Mar 5, 2005 (UTC)
Removal of formula
I've removed this formula as it clearly doesn't do what it is claimed to, but I cannot find a reference to fix it (the lack of a reference is itself a problem). I do hope someone can supply the corrected version Robma 11:17, 14 May 2006 (UTC)
- It doesn't? It seemed to when I tried it... — vijay 18:14, 14 May 2006 (UTC)
Using MathCad it started producing composites around the n = 27 mark. But I suspect this may be due to rounding error. Either way, I still think we need a reference for this formula (I for one would be v interested to learn more about it; it's an unusually neat result for this field). Robma 21:06, 14 May 2006 (UTC)
- Hrm. Around that range (excluding the 2s) I get
- n=22 => 23
- n=28 => 29
- n=30 => 31
- n=36 => 37
- n=40 => 41
- I used Java ('cause it's what I have), and of course, I used ints at first, which led to an overflow and negative output. Switching to BigInteger did the trick :-). A reference would be good, though. I put a note on the contributing editor's talk page. — vijay 22:24, 14 May 2006 (UTC)
- Great stuff; thanks for confirming that. I'll get in touch with some people about getting a ref for this formula, and also the one queried below (which again is unfamiliar to me too).Robma 07:29, 16 May 2006 (UTC)
Robma, please specify which formula you are removing from the article instead of just referring to it on the talk page as "this" formula so that editors don't have to hunt through the page's history (which is easy now, but won't be so easy months in the future). Thanks! Anyway, the formula under discussion here, for the benefit of people reading this talk page, is:
I've restored it, since it seems from the above discussion and that the formula is correct, even if we still are missing a citation. The formula was originally added by User:LC to the prime number article ([1]) and then moved to this article by User:Henrygb. —Lowellian (reply) 04:46, 25 May 2006 (UTC)
- Ah, ha! With a little help from a friend, here is the proof, which is rather trivial:
- First, consider the case where n is one less than a prime, that is, when . This is equivalent to saying that the modulus is prime. Then:
- Applying Wilson's theorem, we get:
- So clearly, when the modulus is a prime p, , so when is prime, ranges over all the primes.
- Now, we still have to prove that when is not prime, we get . To prove this, all we need to do is show that , since then that term drops out, leaving only the 2. We proceed to do this:
- If is not prime, then we can write , where p is the smallest prime that divides . Clearly, since p and k are both factors of , we have and . Unless , both p and k are distinct factors of the expansion , implying that .
- Now, let's take the final case, where and , that is, wherein . We know , since p is the square root of , and , since for all integers , . Therefore, the expansion contains both 2p and p, so and . QED.
Correct formula
I have a doubt with the formula for n-th prime, i have never seen it demonstrated i mean: --Karl-H 20:35, 15 May 2006 (UTC)
Venugopalan Atiyolil's formula for the (n+1)th Prime
"In the Proceedings of the Indian Academy of Sciences(Math. Sci.), Vol.92, No.1,September 1983 pp 49-52, an explicit formula for the (n+1)th Prime which is the same as nth Prime as n could be substituted for n+1 for a given integer. In other words, if one wants to find the 6th Prime Number, then the integer n=5. The paper also gives a formula for the (n+1)th Twin prime which is the same as the nth Twin Prime. Further, the paper gives formulae for number of Primes and Twin Primes less than any given Prime. The proof is written in a cumbersome format to avoid plagiarism and therefore it is difficult to follow. The following are the pages of the paper. http://www.ias.ac.in/jarch/mathsci/92/00000050.pdf http://www.ias.ac.in/jarch/mathsci/92/00000051.pdf http://www.ias.ac.in/jarch/mathsci/92/00000052.pdf http://www.ias.ac.in/jarch/mathsci/92/00000053.pdf http://www.ias.ac.in/jarch/mathsci/93/00000068.pdf"
This paragraph is hard to understand. Here is my suggestion, but I haven't implemented it because I am uncertain that my reformulation replicates the meaning of the original.
"In the Proceedings of the Indian Academy of Sciences(Math. Sci.), Vol.92, No.1, September 1983 pp 49-52, an explicit formula for the nth prime number is given. The paper also gives a formula for the nth twin prime. Further, the paper gives formulae for the number of primes and twin primes less than any given prime. The proof is written in a cumbersome format to avoid plagiarism and therefore it is difficult to follow. The following are the pages of the paper. http://www.ias.ac.in/jarch/mathsci/92/00000050.pdf http://www.ias.ac.in/jarch/mathsci/92/00000051.pdf http://www.ias.ac.in/jarch/mathsci/92/00000052.pdf http://www.ias.ac.in/jarch/mathsci/92/00000053.pdf http://www.ias.ac.in/jarch/mathsci/93/00000068.pdf"--Dougall 07:47, 14 July 2006 (UTC)
One good thing of these formulae is that the paper gives a formula for the number of twin primes. The twin prime conjecture is still unsolved ! All formulae are very correct with consideration to errata published (00000068.pdf). — Preceding unsigned comment added by 72.87.101.104 (talk) 01:44, 29 June 2011 (UTC)
The reason why some people could not understand the above paper is becasue they don't interpret [ ] as INTEGRAL PART in step 16 of the page 51 of the paper to get the (n+1)th prime.
Can someone elaborate or simplyfy proof of this formulae for Prime Numbers, Twin Primes, Number of Primes and number of Twin Primes as the formula is correct if you read the errata (00000068.pdf), later published. It seems there was a printing error which was later corrected. Proceedings of the Indian Academy of Sciences only publishes papers after three referees(mathematicians) who peruse the contents as correct to be published. Sometimes there could be printing errors. The sign [ ] is denoted for integral part -not just a bracket!
After reading all these criticisms on a mathematically correct issue,which was refereed by three mathematicians, it seems only reasonable that the Author chose to publish the proof in an obscure way to aviod stealth by greed. Be positive in thinking and you would only indulge yourself into elimination of myth manufactured by ignorance. No wonder people quit research as it is sometime non-rewarding and a subject of negetive criticism. The papers stands still with no progress even after all these years when the Author was just about to prove or disprove twin prime conjecture. Learn a lesson from it.
—Preceding unsigned comment added by 64.223.54.183 (talk)
Concerning the paper of Venu Atiyolil
I am going to note that the mentioned formula has a running time of at least seeking out the next prime and trial dividing in any practical case.
—Preceding unsigned comment added by 69.254.220.41 (talk • contribs) 21:26, 4 October 2006
It is the first explicit formula for the nth Prime. Nothing to do with running time. It could be simplified if done enough research. —Preceding unsigned comment added by 74.97.4.93 (talk) 01:21, 23 December 2010 (UTC)
Error in Formula based on a system of Diophantine equations
The given prime-generating polynomial seems to be wrong. The right formula should be: (K+2)(1-α12-α22-...-α142). 89.138.48.98 15:30, 9 April 2007 (UTC)
- You're absolutely right. Thanks a lot! -- Jitse Niesen (talk) 01:47, 10 April 2007 (UTC)
- Yet neither of you corrected it, anyway it's done now. Smithers888 (talk) 22:36, 13 June 2008 (UTC)
Polynomial formulaes --> editing a bit
At the moment it is written: "A general theorem of Matiyasevich says that if a set is defined by a system of Diophantine equations, it can also be defined by a system of Diophantine equations in only 9 variables. Hence, there is a prime-generating polynomial as above with only 10 variables. However, its degree is large (in the order of 1045)."
This can be misunderstood by reader like this: "the degree of any prime-generating polynomial with 10 variables is at least 10^45" --> however, only the currently known method of getting such polynomial require degree 10^45; there is a chance that someone will find the prime-generating polynomial with 10 variables using completely other method and get much smaller value. As far as I understand the only 2 known results about prime-generating polynomials are that if such polynomial has A variables and B is its degree, then A>1 and B>1 (and no better estimations are known), so, there is a chance that some polynomial with 2 variables of degree 2 is prime-generating.
If someone can rewrite the text a bit to exclude such misunderstanding, this will be great (my English is not very good as you see). Thanks.
—Preceding unsigned comment added by 217.150.50.194 (talk • contribs) 10:40, 25 May 2007
Moved formula from article
I have reverted the following addition to the article. My edit summary "revert latest edit. Very complicated formula with no explanation. Sums 2^n numbers to find nth prime. Must be among the slowest ever if it works" [2] PrimeHunter 01:03, 8 August 2007 (UTC)
Formula elaborated by Lainé Jean Lhermite Junior
visit : http://www.institutionscle.nombrespremiers.net
Polynomial equations
Hank Harrell has done work in this area [3] He claims the following produces 12 fold the # primes over what is expected on average (using P#=151*149*139*...2,c=73033421, x={1,1000}):
- candidate = P#*x^2-P#*x + C, where P# is a primorial and C is a positive integer
- candidate = P#*x^2-P#*x + C, where P# is a primorial and C is a positive integer
Essentially it is a "prime candidate -generating" equation akin to the older classics but yielding much larger primes--Billymac00 (talk) 17:03, 18 February 2008 (UTC)
Goldbach's
in effect, [Goldbach's conjecture] is a simple (iterative) prime "formula" always returning 2 primes each >=5 from each input pair described as:
starting with 2 integers (same parity, at least 1 not prime,>=6),
- (N1,N2) via (N1-d,N2+d) will yield 2 primes < (N1+N2)
- where max d = max(N1,N2)-5 [d,N1,N2 are all positive integers]
An example is (39,25) which generates (4) pairs (max d=34)
- (23,41), (17,47), (11,53), (5,59)
- (23,41), (17,47), (11,53), (5,59)
[Another solution (3,61) exists outside of the conditions prescribed above ]
Similarly, (32,32) generates the same (4) pairs as 32+32 =39+25 (identical sums)
It generates "varied" bounded primes [unsure if every prime gets generated (imagine so)]--Billymac00 (talk) 22:17, 6 March 2008 (UTC)
Formula based on Wilson's theorem
I removed the following text from the section "Other formulas":
- This formula is wrong and no longer is able to creat many of prime numbers, i.e. i have examined it for n = 18 and it's result was not correct! This formula has generate 2 for every n greater than 19. And for n = 18 the result is 18 that is obvious it is'nt a prime number!!
- —Preceding unsigned comment added by Threepehr (talk • contribs) 04:39, 12 May 2008
I tried it out for n = 18, and I got 19, just as the theory predicts. -- Jitse Niesen (talk) 11:38, 12 May 2008 (UTC)
- Yes, the formula is correct. The IP must have evaluated it incorrectly. PrimeHunter (talk) 18:00, 12 May 2008 (UTC)
- Can people who don't know much mathematics not edit maths articles please. The Wilson formula is pretty trivially correct and well-known —Preceding unsigned comment added by 94.172.196.23 (talk) 12:15, 19 July 2009 (UTC)
Wikipedia's Expert Peer Review process (or lack of such) for Science related articles
Hi - I posted the section with the same name on my talk page. Could you take part in discussion ? Thanks ARP Apovolot (talk) 21:28, 25 October 2008 (UTC)
Small arithmetic change
I'm sure that
...is exactly the same as...
No?
Ignore this, I missed the negative sign.
58.7.8.182 (talk) 16:05, 30 June 2009 (UTC)
MILLS formula is WRONG!
PROGRAM ImbalzanoG; begin REPEAT write("MILLS formula is WRONG!") until TRUE end. (*All the best!*) —Preceding unsigned comment added by Imbalzanog (talk • contribs) 13:33, 29 August 2009 (UTC)
- I guess you are User:Jmbalzan who made this edit. Please don't make edits about the same thing using different accounts. See Wikipedia:Sock puppetry. Mills' constant lists reliable sources for the formula and the statement that it's unknown whether Mills' constant is rational. Wikipedia does not allow original research. PrimeHunter (talk) 16:08, 29 August 2009 (UTC)
OK! <jmbalzan> = <user:imbalzanog> but the 'MILLS formula is wrong! In fact (IF A=1.30637788386308069046) for n=0, 1, 2, .., 4 one obtain the "prime numbers".. 1, 1, 2, .., 1361, but for n=3 one obtain 8 ..NOT 11, like from the sequence 1, 1, 2, 11, 1361, 2521008887.. or the Riemann hypothesis is wrong?! All the best for this! Prof. Giovanni Imbalzano, ThanX. —Preceding unsigned comment added by Imbalzanog (talk • contribs) 19:50, 29 August 2009 (UTC)
- Your calculation for n=3 is wrong, and the primes start at n=1, not at n=0. For n = 1, 2, 3, 4, ...
- floor(A(3n)) = 2, 11, 1361, 2521008887... (sequence A051254 in the OEIS)
- For n=3 it is floor(A(33)) = floor(A27) = floor(11.082031) = 11. No integer n gives the value 8. PrimeHunter (talk) 20:14, 29 August 2009 (UTC)
Sorry! My (PASCAL and) FORTRAN program done: A^(n^3)= A(2^3)=8.483021265734882348686267276902336962502905672556765306326251816065644520340083810648493349954739074, =>FLOOR=8 NOT 11 but I use A=1.30637788386308069046 and "real or complex number calculations with 100-significant-figure precision. " ..AND for n=3: 1361.000001079726460999192860124432416917474694599497777199482905339934552915037249561521962884051614 Evident! The formula is A^(3^n) NOT A^(n^3)..! PARDON, but I search of verifies again ! FOR n=4 FORTRAN done: A^(3^n)= 2521008886.999999998653456843300060421152569980618097269190530906867869731446814744897933120185555674, FLOOR=2521008886 NOT prime, CEIL=2521008887... —Preceding unsigned comment added by Imbalzanog (talk • contribs) 20:52, 29 August 2009 (UTC) ..AND finally FOR n=5: A^(3^n)= 16022236204009818106157512334.85693084207614172497541238587106571181797337053375889904228588259040492 FLOOR=16022236204009818106157512334, CEIL=16022236204009818106157512335, both NON prime! THEN or MIILS or RIEMANN hypothesis is FALSE.. or BOTH! G.I. —Preceding unsigned comment added by Imbalzanog (talk • contribs) 20:58, 29 August 2009 (UTC)
You don't have enough decimals of A in your calculations. Here are 600: A = 1.30637788386308069046861449260260571291678458515671\ 36443680537599664340537668265988215014037011973957\ 07296960938103086882238861447816353486887133922146\ 19435345787110033188140509357535583193264801721383\ 23615223590622186016108566790572151979760951619929\ 52797079925631721527841237130765849112456317518426\ 33105652153513186684155079079372385923352208421842\ 04053205176890260257934430086952906362056989687262\ 12274997876664385157661914387728449820775905648255\ 60915004123788524793626088046688154064374425340131\ 07361144094137650364379301267672117131030265228386\ 61546668804874760951441079075406984172603473107746
This precision gives 6 primes: 2, 11, 1361, 2521008887, 16022236204009818131831320183, 4113101149215104800030529537915953170486139623539759933135949994882770404074832568499. The 7th number is composite when A is "only" given to the 600 decimals above. PrimeHunter (talk) 21:50, 29 August 2009 (UTC)
Thank you, but inform the readers of this necessity. Besides, I am convinced that all this is an "artificial construction": we could get analogous results in many other ways, without importance for the mathematics... OK? G.I. —Preceding unsigned comment added by Imbalzanog (talk • contribs) 19:44, 30 August 2009 (UTC)
- Formula for primes#Mills's formula says: "the smallest such A has a value of around 1.3063... and is known as Mills' constant". I don't see what more is neeed. "..." signals there are more decimals. Of course you don't get exact results if you only include some of the decimals. I don't see a good reason to mention exactly how many decimals are needed to get the right prime for n=4 when none of the primes for any n value is mentioned in Formula for primes. However, a couple of days ago I edited Mills' constant in [4] to display the decimals required to get the primes listed in that article: 2, 11, 1361, 2521008887. Mills proved a non-trivial result which has interested many people and is mentioned in many reliable sources. I think it belongs here much more than many of the useless formulas to generate primes with convoluted expressions which are just equivalent to a very slow form of trial division. PrimeHunter (talk) 02:03, 31 August 2009 (UTC)
Now I agree, for the satisfactory article of citation. This confirms also my opinion, that the hypothesis of Riemann is dynamic: the hypothesis is true because and until we may build the mathematics... but in the same time the mathematics coherence is indefinite (Kurt Gödel). Imbalzanog (talk) 15:02, 2 September 2009 (UTC)
Problems with the proof at "Prime formulas and polynomial functions"
The proof that "no non-constant polynomial function P(n) exists that evaluates to a prime number for all integers n."
1. Assumes that all the coefficient of the polynomial are integers - which is not true see for example http://www.maa.org/editorial/mathgames/mathgames_07_17_06.html where there is a polynomial of order 5 with 57 conservative primes.
2. Is not simple at all - need more clarification. —Preceding unsigned comment added by 84.109.83.123 (talk) 19:59, 19 July 2010 (UTC)
Please study Venu Atiyolil formula. It gives the nth prime by polynomial with a condition that one needs to take the integral part of the result. In simple words, the result may be 5.00234567.... and the integral part is 5 which yield the 3rd prime so on and so forth to infinity . —Preceding unsigned comment added by 74.97.4.93 (talk) 01:27, 23 December 2010 (UTC)
Just checking
In the first sentence, the phrase "exactly and without exception"... that means "every prime, and no non-prime", yes? DS (talk) 13:19, 23 August 2010 (UTC)
The primes for n = 0, 1, 2, 3... are 41, 43, 47, 53, 61, 71 (in Euler formula)
Actually 41, 41, 43, 47, 53, 61, 71 ...... —Preceding unsigned comment added by 165.228.167.155 (talk) 04:02, 4 February 2011 (UTC)
- Fixed in [5]. The idea is to produce 40 distinct primes so for n2 − n + 41 it's n from 1 to 40 (there is a variation n2 + n + 41 where it's 0 to 39). PrimeHunter (talk) 04:25, 4 February 2011 (UTC)
Sabihi paper and revert war
wikipedia has a guideline WP:3RR to prevent revert wars. We appear to have one about the Sabihi paper. I had a look for for citations for the paper "A Novel Explicit Formula for Computing π(x), the Number of Primes" and I could not find any so it does not meet the standards for a Reliable source and may falls Original research. Rather than revert the matter needs to be discussed here on the talk page, or further actions pike page protection may be needed.--Salix (talk): 22:53, 3 November 2012 (UTC)
- There is a discussion of this material at Wikipedia_talk:WikiProject_Mathematics. Deltahedron (talk) 07:31, 4 November 2012 (UTC)
======================================================================================================
about the diophantine equations since the link to the natural numbers gives two different definitions, i suggest to write that the solutions must be in non-negative integers (as in the original article) i suspect that no solution is known, am i right in thinking this? — Preceding unsigned comment added by 2A00:1620:C0:64:21C:61FF:FE03:A4C (talk) 13:41, 14 December 2012 (UTC)