Joural's Ttle, Vol., 00, o., - O formula to compute prmes ad the th prme Issam Kaddoura Lebaese Iteratoal Uversty Faculty of Arts ad ceces, Lebao Emal: ssam.addoura@lu.edu.lb amh Abdul-Nab Lebaese Iteratoal Uversty chool of Egeerg, Lebao Emal: samh.abdulab@lu.edu.lb Abstract I ths paper, we propose a ew prmalty test, ad the we employ ths test to fd a formula for π that computes the umber of prmes wth ay terval. We fally propose a ew formula that computes the th prme umber as well as the et prme for ay gve umber. Keywords: prme, cogruece, prmalty test, Eucldea algorthm, seve of Eratosthees.. Itroducto ce Eucld [], prmes ad prme geerato were a challege of terest for umber theory researchers. Prmes are used may felds, oe ust eed to meto for eample the mportace of prmes etworg ad certfcate geerato []. ecurg commucato betwee two devces s acheved usg prmes sce prmes are the hardest to decpher [5]. The search for prme umbers s a cotuous tas for researchers. ome le [4] are loog for tw prmes others le [] are loog for large scaled prme umbers. The prme coutg fucto s a fucto that gves the umber of prmes that are less tha or equal to a gve umber. May le [] ad others have preseted the formula to compute the umber of prmes betwee ad a gve teger. Ths paper s dvded as follow: secto we preset the prmalty test. I secto 3, we troduce the prme coutg fucto that we wll use secto 5 to fd the et prme to ay gve umber. I secto 4, we coduct some results
ad buld the th prme fucto. I secto, we wll use the prmalty test to compare our results wth some recet results the lterature ad coclude ths paper.. Prmalty test I the paper, we employ the Euclda algorthm, eve of Eratosthees ad the fact that every prme s of the form where a teger. Let be a real umber, the floor of, deoted by s the largest teger that s less or equal to. To test the prmalty of t s eough to test the dvsblty of by all prmes. Let be of the form. mlarly, let be of the form. Theorem : If s ay teger such that g.c.d, = ad, the s prme f ad oly f s composte f ad oly f 0 Proof: s prme gcd, = mod 0, wth the rage of the summato the formulas of ad.
mlarly = ad cosequetly = The proof of the secod part of the theorem s obvous. 3. Prme Coutg Fucto The prme coutg fucto, deoted by the Gree letter π, s the umber of prmes less tha or equal to a gve umber. Computg the prmes s oe of the most fudametal problems umber theory. You ca see [0] for the latest wors regardg prme coutg fuctos. Usg the prevous prmalty test, we defe the followg ew form of the prme coutg fucto π. Recall that f s prme 3. 0 f s composte The couts the prmes betwee m ad where m. m Ad we ca wrte a formula for π as follows : 4 3. The sze of ths summato ca be dramatcally reduced by cosderg oly of the form +5 or +. 4 3.3 Thus the followg theorem s already proved. Theorem 5:, gves the umber of prmes. 4. The th Prme Fucto We are ow ready to troduce our ew formula to fd the th prme. The th prme umber s deoted by p wth p =, p =3, p 3 = 5 ad so o. Frst we troduce f as follows
f For =,, 3 ad = 0,,... 4. Or f For =,, 3 ad = 0,,... 4. These fuctos have the property that for for f 0 4.3 It s well ow that P ; see [8] ad [] for more detals. Usg the followg formula combed wth the above formula for π f P 4.4 We use f as 4. to obta the followg formula for th prme full: 4 P 4 3 P 4.5 Or usg f as 4. to obta the formula for th prme full: 5 P 4. These formulas are terms of aloe ad we do ot eed to ow ay of the prevous prmes. ee [] for formulas of the same ature.
The Wolfram Mathematca mplemetato of P as 4.5 s as follow: A[_] := -/Floor[Floor[qrt[]]/] + * um[floor[floor[/ + ] - / + ], {,, Floor[Floor[qrt[]]/] + }] B[_] := -/Floor[Floor[qrt[]]/] + * um[floor[floor[/ - ] - / - ], {,, Floor[Floor[qrt[]]/] + }] [_] := A[] + B[]/ PN[_] := 4 + um[floor[[ + ]], {,, Floor[ - /]}] + um[floor[[ - ]], {,, Floor[ + /]}] PT[_] := 3 + Floor[*Log[]] - um[floor[/*4 + um[floor[[ + ]], {,, Floor[ - /]}] + um[floor[[ - ]], {,, Floor[ + /]}]], {,, Floor[*Log[]] + }] 5. Net Prme The fucto etp fds the frst prme umber that s greater tha a gve umber. As [9] ad usg as defed secto, t s clear that: ad ow cosder the summato etp etp 0 such that etp etp = 0 etp fally we obta etp etp etp 5. We used the proposed prmalty test to mplemet etp as follow: et m m et 3 If the go to step 8 4 et m 5 5 If m the go to step 8 Go to step 8 Output the value of m
The Wolfram Mathematca mplemetato of etp s as follow: A[_] := -/Floor[Floor[qrt[]]/] + * um[floor[floor[/ + ] - / + ], {,, Floor[Floor[qrt[]]/] + }] B[_] := -/Floor[Floor[qrt[]]/] + * um[floor[floor[/ - ] - / - ], {,, Floor[Floor[qrt[]]/] + }] [_] := A[] + B[]/ =Iput["Iput a umber:"]; =Celg[-/]; m=0; Whle[True, m=+; If[[m]==,Brea[]]; m=+5; If[[m]==,Brea[]]; =+;]. Epermetal Results We mplemeted our algorthm usg Wolfram Mathematca verso 8. Table shows the results for the th prme whle table shows the results for the et prme. Those epermetal results show the complety of our prmalty test Refereces th prme P Value 50 4.s 9 00 5.58s 54 00.9s 3 50 8.4s 583 Table : th prme Net prme Net to etp Value 0^8 0.04s 0000000 0^9 0.8s 00000000 0^0.0s 000000009 0^.0s 00000000003 0^ 43.8s 000000000039 0^3 3.4 000000000003 Table : Net prme [] ANI. ANI X9.3-998: Dgtal gatures usg Reversble Publc Key Cryptography for the Facal ervces Idustry. Apped A, Amerca Natoal tadards Isttute, 998
[] C. P. Wllas, O Formulae for the th Prme Number, The Mathematcal Gazette, Vol. 48, No. 3, December, 94, 43-45 [3] E.. Rowlad, A Natural Prme-Geeratg Recurrece, Joural of Iteger equeces, Vol., 008, Artcle 08..8 [4] G. Teebaum, ad M.M. Frace, The prme umbers ad ther dstrbuto. Provdece, Amerca Mathematcal ocety. RI, 000. [5] IEEE. IEEE P33: tadard pecfcatos for Publc Key Cryptography. IEEE P33a D, Amedmet : Addtoal Techques. December, 00. [] M. Deléglse ad J. Rvet. Computg π: The Messel, Lehmer, Lagaras, Mller, Odlyzo Method. Mathematcs of computg. Vol. 5, 99, 35-45 [] M. Joye, P. Paller ad. Vaudeay. Effcet Geerato of Prme Numbers, vol. 95 of Lecture Notes Computer cece, 000, 340-354, prger-verlag. [8]. M. Ruz, Applcatos of maradache Fuctos ad Prme ad Coprme Fuctos, Amerca Research Press, Rehoboth, 00. [9]. M. Ruz, The geeral term of the prme umber sequece ad the maradache Prme Fucto, maradache Notos Joural 000 59. [0] T. Olvera e lva, Computg π: The combatoral method. Revsta do Detua, vol. 4,, march 00 [] V.. Igumov, Geerato of the large radom prme umbers. Toms tate Uversty Russa. Electro Devces ad Materals. 004, - 8 [] W. Narewcz, The developmet of prme umber theory: from Eucld to Hardy ad Lttlewood, prger Moographs Mathematcs, Berl, New Yor: prger-verlag, 000