My Math Forum Primes formula

 Number Theory Number Theory Math Forum

 March 14th, 2014, 01:25 AM #1 Banned Camp   Joined: Dec 2012 Posts: 1,028 Thanks: 24 Primes formula Hi, Could you pls let me know: 1) the "official" formula to discover if n is a prime or not (not an algorithm in several step, but the direct forumula that return n = prime yes or no) I've my one: z=n!/n^2 I works for n>=5 : if z = integer then n = non prime, else n= prime 2) The "official" formula to have the number of prime from 0 and x (not Riemann i remember there is one from 1968 ?). I've my one: $Pi(x)= \sum_{n = 5}^{\ x}{ [Int [[((n!/n^2)-int(n!/n^2)]+0.3]] +2 }$ 3) The "official" formula to have the NEXT Prime: so given P(x) find P(x+1) ? I've my one base on the 1 and 2, but is very ugly and of course not "PC" usable since the same of brute force (but still an exact formula !).... Given your P(x) you first use the (2) to discover x=a. So once you have P(a) you can find P(a+1) with this: Somethink has to be correct: - 0.2 must be 0.3 as in my (2) - the upper limit must be 2*(P(x)) since is well known that from P(x) and 2*P(x) there is for sure a prime. this let it works (if i copy the correct one)... Note to avoid confusion: the lower limit is P(a) +1, so if you have P(a) = 7 a= 3, P(a)+1 = 8 the first number you've to check. Of course you've to check just odd numbers... Thanks ciao Stefano
 March 14th, 2014, 05:26 AM #2 Global Moderator     Joined: Nov 2006 From: UTC -5 Posts: 16,046 Thanks: 938 Math Focus: Number theory, computational mathematics, combinatorics, FOM, symbolic logic, TCS, algorithms Re: Primes formula There are hundreds of such formulas and certainly no 'official' ones. At one point I started to gather them (toward the end of eventually publishing a list on my website) but there were so many I got disheartened by the effort required. MathWorld and Wikipedia have pages listing a few formulas, Guy's UPNT has a section devoted to this, and there are several published papers that list such formulas (in addition to many dozens of papers which give new formulas, of course). Mostly these papers are older -- I'm not sure if you could even get such a paper published today (well, on the arXiv probably).

 Tags formula, primes

 Thread Tools Display Modes Linear Mode

 Similar Threads Thread Thread Starter Forum Replies Last Post caters Number Theory 67 March 19th, 2014 04:32 PM gelatine1 Algebra 13 July 15th, 2013 01:59 AM joexian Number Theory 0 January 15th, 2013 07:50 PM billymac00 Number Theory 4 November 22nd, 2009 04:05 PM agro Probability and Statistics 3 August 27th, 2009 06:17 AM

 Contact - Home - Forums - Cryptocurrency Forum - Top