On Formula to Compute Primes. and the n th Prime



Similar documents
On formula to compute primes and the n th prime

Properties of MLE: consistency, asymptotic normality. Fisher information.

3. Greatest Common Divisor - Least Common Multiple

A Note on Sums of Greatest (Least) Prime Factors

1. MATHEMATICAL INDUCTION

Chair for Network Architectures and Services Institute of Informatics TU München Prof. Carle. Network Security. Chapter 2 Basics

In nite Sequences. Dr. Philippe B. Laval Kennesaw State University. October 9, 2008

Section 11.3: The Integral Test

A probabilistic proof of a binomial identity

Annuities Under Random Rates of Interest II By Abraham Zaks. Technion I.I.T. Haifa ISRAEL and Haifa University Haifa ISRAEL.

FIBONACCI NUMBERS: AN APPLICATION OF LINEAR ALGEBRA. 1. Powers of a matrix

Chapter 6: Variance, the law of large numbers and the Monte-Carlo method

Modified Line Search Method for Global Optimization

CS103X: Discrete Structures Homework 4 Solutions

SECTION 1.5 : SUMMATION NOTATION + WORK WITH SEQUENCES

Soving Recurrence Relations

A Combined Continuous/Binary Genetic Algorithm for Microstrip Antenna Design


Sequences and Series

Sampling Distribution And Central Limit Theorem

Chapter 5: Inner Product Spaces

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 13

Infinite Sequences and Series

Factors of sums of powers of binomial coefficients

CS103A Handout 23 Winter 2002 February 22, 2002 Solving Recurrence Relations

PROCEEDINGS OF THE YEREVAN STATE UNIVERSITY AN ALTERNATIVE MODEL FOR BONUS-MALUS SYSTEM

Department of Computer Science, University of Otago

Incremental calculation of weighted mean and variance


Theorems About Power Series

1 Computing the Standard Deviation of Sample Means

Lecture 4: Cheeger s Inequality

The following example will help us understand The Sampling Distribution of the Mean. C1 C2 C3 C4 C5 50 miles 84 miles 38 miles 120 miles 48 miles

Section 8.3 : De Moivre s Theorem and Applications

COMPARISON OF THE EFFICIENCY OF S-CONTROL CHART AND EWMA-S 2 CONTROL CHART FOR THE CHANGES IN A PROCESS

Elementary Theory of Russian Roulette

An Efficient Polynomial Approximation of the Normal Distribution Function & Its Inverse Function

A Recursive Formula for Moments of a Binomial Distribution

Overview of some probability distributions.

The Stable Marriage Problem

I. Chi-squared Distributions

Asymptotic Growth of Functions

Systems Design Project: Indoor Location of Wireless Devices

Hypothesis testing. Null and alternative hypotheses

LECTURE 13: Cross-validation

Entropy of bi-capacities

THIN SEQUENCES AND THE GRAM MATRIX PAMELA GORKIN, JOHN E. MCCARTHY, SANDRA POTT, AND BRETT D. WICK

Trigonometric Form of a Complex Number. The Complex Plane. axis. ( 2, 1) or 2 i FIGURE The absolute value of the complex number z a bi is

Your organization has a Class B IP address of Before you implement subnetting, the Network ID and Host ID are divided as follows:

WHEN IS THE (CO)SINE OF A RATIONAL ANGLE EQUAL TO A RATIONAL NUMBER?

Approximating Area under a curve with rectangles. To find the area under a curve we approximate the area using rectangles and then use limits to find

ON AN INTEGRAL OPERATOR WHICH PRESERVE THE UNIVALENCE

Normal Distribution.

Convexity, Inequalities, and Norms

Integer Factorization Algorithms

Lecture 3. denote the orthogonal complement of S k. Then. 1 x S k. n. 2 x T Ax = ( ) λ x. with x = 1, we have. i = λ k x 2 = λ k.

Factoring x n 1: cyclotomic and Aurifeuillian polynomials Paul Garrett <garrett@math.umn.edu>

Output Analysis (2, Chapters 10 &11 Law)

Lecture 4: Cauchy sequences, Bolzano-Weierstrass, and the Squeeze theorem

Confidence Intervals for One Mean

Example 2 Find the square root of 0. The only square root of 0 is 0 (since 0 is not positive or negative, so those choices don t exist here).

CHAPTER 7: Central Limit Theorem: CLT for Averages (Means)

Cooley-Tukey. Tukey FFT Algorithms. FFT Algorithms. Cooley

ON THE DENSE TRAJECTORY OF LASOTA EQUATION

Maximum Likelihood Estimators.

Confidence Intervals. CI for a population mean (σ is known and n > 30 or the variable is normally distributed in the.

Topic 5: Confidence Intervals (Chapter 9)

THE ABRACADABRA PROBLEM

UC Berkeley Department of Electrical Engineering and Computer Science. EE 126: Probablity and Random Processes. Solutions 9 Spring 2006

THE ARITHMETIC OF INTEGERS. - multiplication, exponentiation, division, addition, and subtraction

NEW HIGH PERFORMANCE COMPUTATIONAL METHODS FOR MORTGAGES AND ANNUITIES. Yuri Shestopaloff,

Taking DCOP to the Real World: Efficient Complete Solutions for Distributed Multi-Event Scheduling

Vladimir N. Burkov, Dmitri A. Novikov MODELS AND METHODS OF MULTIPROJECTS MANAGEMENT

Our aim is to show that under reasonable assumptions a given 2π-periodic function f can be represented as convergent series

Project Deliverables. CS 361, Lecture 28. Outline. Project Deliverables. Administrative. Project Comments

Data Analysis and Statistical Behaviors of Stock Market Fluctuations

4.3. The Integral and Comparison Tests

Confidence Intervals

Chapter 7 Methods of Finding Estimators

Lecture 5: Span, linear independence, bases, and dimension

A Faster Clause-Shortening Algorithm for SAT with No Restriction on Clause Length

The analysis of the Cournot oligopoly model considering the subjective motive in the strategy selection

Building Blocks Problem Related to Harmonic Series

SAMPLE QUESTIONS FOR FINAL EXAM. (1) (2) (3) (4) Find the following using the definition of the Riemann integral: (2x + 1)dx

Research Method (I) --Knowledge on Sampling (Simple Random Sampling)

Research Article Sign Data Derivative Recovery

Measures of Spread and Boxplots Discrete Math, Section 9.4

Recovery time guaranteed heuristic routing for improving computation complexity in survivable WDM networks

Solving Logarithms and Exponential Equations

Convention Paper 6764

Institute of Actuaries of India Subject CT1 Financial Mathematics

A Fuzzy Model of Software Project Effort Estimation

EGYPTIAN FRACTION EXPANSIONS FOR RATIONAL NUMBERS BETWEEN 0 AND 1 OBTAINED WITH ENGEL SERIES

THE HEIGHT OF q-binary SEARCH TREES

1. C. The formula for the confidence interval for a population mean is: x t, which was

Present Value Factor To bring one dollar in the future back to present, one uses the Present Value Factor (PVF): Concept 9: Present Value

Transcription:

Applied Mathematical cieces, Vol., 0, o., 35-35 O Formula to Compute Primes ad the th Prime Issam Kaddoura Lebaese Iteratioal Uiversity Faculty of Arts ad cieces, Lebao issam.kaddoura@liu.edu.lb amih Abdul-Nabi Lebaese Iteratioal Uiversity chool of Egieerig, Lebao samih.abdulabi@liu.edu.lb Abstract I this paper, we propose a ew primality test, ad the we employ this test to fid a formula for π that computes the umber of primes withi ay iterval. We fially propose a ew formula that computes the th prime umber as well as the et prime for ay give umber. Keywords: prime, cogruece, primality test, Euclidea algorithm, sieve of Eratosthees. Itroductio ice Euclid [], primes ad prime geeratio were a challege of iterest for umber theory researchers. Primes are used i may fields, oe ust eed to metio for eample the importace of primes i etworkig ad certificate geeratio []. ecurig commuicatio betwee two devices is achieved usig primes sice primes are the hardest to decipher [5]. The search for prime umbers is a cotiuous task for researchers. ome like [4] are lookig for twi primes others like [] are lookig for large scaled prime umbers. The prime coutig fuctio is a fuctio that gives the umber of primes that are less tha or equal to a give umber. May like [] ad others have preseted the formula to compute the umber of primes betwee ad a give iteger.

35 I. Kaddoura ad. Abdul-Nabi This paper is divided as follow: i sectio we preset the primality test. I sectio 3, we itroduce the prime coutig fuctio that we will use i sectio 5 to fid the et prime to ay give umber. I sectio 4, we coduct some results ad build the th prime fuctio. I sectio, we will use the primality test to compare our results with some recet results i the literature ad coclude this paper.. Primality test I the paper, we employ the Euclidia algorithm, ieve of Eratosthees ad the fact that every prime is of the form k±where k a iteger. Let be a real umber, the floor of, deoted by is the largest iteger that is less or equal to. To test the primality of it is eough to test the divisibility of by all primes. Let be of the form. k k k imilarly, let be of the form k k k. Theorem : If is ay iteger such that g.c.d, ad, the i is prime if ad oly if ii is composite if ad oly if 0 < Proof: is prime gcd, i i / 0 mod i i, k k k withi the rage of the summatio i the k k

O formula to compute primes 353 formulas of ad. k imilarly ad cosequetly The proof of the secod part of the theorem is obvious. 3. Prime Coutig Fuctio The prime coutig fuctio, deoted by the Greek letter π, is the umber of primes less tha or equal to a give umber. Computig the primes is oe of the most fudametal problems i umber theory. You ca see [0] for the latest works regardig prime coutig fuctios. Usig the previous primality test, we defie the followig ew form of the prime coutig fuctio π. Recall that if i is prime i 3. 0 if i is composite The i couts the primes betwee m ad where m. im Ad we ca write a formula for π as follows : π 4 i 3. i The size of this summatio ca be dramatically reduced by cosiderig oly i of the form 5 or. π 4 3.3 Thus the followig theorem is already proved. Theorem 5:, π gives the umber of primes. 4. The th Prime Fuctio We are ow ready to itroduce our ew formula to fid the th prime. The th prime umber is deoted by p with p, p 3, p 3 5 ad so o. First we itroduce f as follows

354 I. Kaddoura ad. Abdul-Nabi f For,, 3 ad 0,,... 4. Or f For,, 3 ad 0,,... 4. These fuctios have the property that < for for f 0 4.3 It is well kow that P ; see [8] ad [] for more details. Usig the followig formula combied with the above formula for π f P π 4.4 We use f as i 4. to obtai the followig formula for th prime i full: 4 P 4 3 P 4.5 Or usig f as i 4. to obtai the formula for th prime i full: 5 P π 4. These formulas are i terms of aloe ad we do ot eed to kow ay of the previous primes. ee [] for formulas of the same ature.

O formula to compute primes 355 The Wolfram Mathematica implemetatio of P as i 4.5 is as follow: A[_] : -/Floor[Floor[qrt[]]/] * um[floor[floor[/ k ] - / k ], {k,, Floor[Floor[qrt[]]/] }] B[_] : -/Floor[Floor[qrt[]]/] * um[floor[floor[/ k - ] - / k - ], {k,, Floor[Floor[qrt[]]/] }] [_] : A[] B[]/ PN[_] : 4 um[floor[[ ]], {,, Floor[ - /]}] um[floor[[ - ]], {,, Floor[ /]}] PT[_] : 3 Floor[*Log[]] - um[floor[/*4 um[floor[[ ]], {,, Floor[i - /]}] um[floor[[ - ]], {,, Floor[i /]}]], {i,, Floor[*Log[]] }] 5. Net Prime The fuctio etp fids the first prime umber that is greater tha a give umber. As i [9] ad usig as defied i sectio, it is clear that: ad i i ow cosider the summatio i i etp i etp 0 i such that etp i etp i i i 0 etp i fially we obtai etp i etp etp 5. i We used the proposed primality test to implemet etp as follow: et k m k m et 3 If the go to step 8 4 et m k 5 5 If m the go to step 8 k k Go to step 8 Output the value of m

35 I. Kaddoura ad. Abdul-Nabi The Wolfram Mathematica implemetatio of etp is as follow: A[_] : -/Floor[Floor[qrt[]]/] * um[floor[floor[/ k ] - / k ], {k,, Floor[Floor[qrt[]]/] }] B[_] : -/Floor[Floor[qrt[]]/] * um[floor[floor[/ k - ] - / k - ], {k,, Floor[Floor[qrt[]]/] }] [_] : A[] B[]/ Iput["Iput a umber:"]; kceilig[-/]; m0; While[True, mk; If[[m],Break[]]; mk5; If[[m],Break[]]; kk;]. Eperimetal Results th prime P Value 50 4.s 9 00 5.58s 54 00.9s 3 50 8.4s 583 Table : th prime We implemeted our algorithm usig Wolfram Mathematica versio 8. Table shows the results for the th prime while table shows the results for the et prime. Those eperimetal results show the compleity of our primality test Net prime 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 prime

O formula to compute primes 35 Refereces [] ANI. ANI X9.3-998: Digital igatures usig Reversible Public Key Cryptography for the Fiacial ervices Idustry. Appedi A, America Natioal tadards Istitute, 998 [] C. P. Willas, O Formulae for the th Prime Number, The Mathematical Gazette, Vol. 48, No. 3, December, 94, 43-45 [3] E.. Rowlad, A Natural Prime-Geeratig Recurrece, Joural of Iteger equeces, Vol., 008, Article 08..8 [4] G. Teebaum, ad M.M. Frace, The prime umbers ad their distributio. Providece, America Mathematical ociety. RI, 000. [5] IEEE. IEEE P33: tadard pecificatios for Public Key Cryptography. IEEE P33a D, Amedmet : Additioal Techiques. December, 00. [] M. Deléglise ad J. Rivet. Computig π: The Meissel, Lehmer, Lagarias, Miller, Odlyzko Method. Mathematics of computig. Vol. 5, 99, 35-45 [] M. Joye, P. Paillier ad. Vaudeay. Efficiet Geeratio of Prime Numbers, vol. 95 of Lecture Notes i Computer ciece, 000, 340-354, priger-verlag. [8]. M. Ruiz, Applicatios of maradache Fuctios ad Prime ad Coprime Fuctios, America Research Press, Rehoboth, 00. [9]. M. Ruiz, The geeral term of the prime umber sequece ad the maradache Prime Fuctio, maradache Notios Joural 000 59. [0] T. Oliveira e ilva, Computig π: The combiatorial method. Revista do Detua, vol. 4,, march 00 [] V.. Igumov, Geeratio of the large radom prime umbers. Tomsk tate Uiversity Russia. Electro Devices ad Materials. 004, - 8 [] W. Narkiewicz, The developmet of prime umber theory: from Euclid to Hardy ad Littlewood, priger Moographs i Mathematics, Berli, New York: priger-verlag, 000 Received: February, 0