New Formulas for Semi-Primes. Testing, Counting and Identification of the Nth and Next Semi-Primes
Total Page:16
File Type:pdf, Size:1020Kb
International Journal of Computer and Information Technology (ISSN: 2279 – 0764) Volume 06 – Issue 01, January 2017 New Formulas for Semi-Primes. Testing, Counting and Identification of the nth and next Semi-Primes Issam Kaddoura, Khadija Al-Akhrass Samih Abdul-Nabi Department of Mathematics, school of arts and sciences Department of computers and communications engineering, Lebanese International University Lebanese International University Saida, Lebanon Beirut, Lebanon Email: Samih.abdulnabi [AT] liu.edu.lb Abstract—In this paper we give a new semiprimality test and we Mathematicians have been interested in many aspects of the construct a new formula for (2) ()N , the function that counts the semiprime numbers. In [5] authors derive a probabilistic number of semiprimes not exceeding a given number N . We also function gy() for a number y to be semiprime and an present new formulas to identify the nth semiprime and the next asymptotic formula for counting gy() when y is very large. semiprime to a given number. The new formulas are based on the In [6] authors are interested in factorizing semiprimes and use knowledge of the primes less than or equal to the cube roots of an approximation to ()n the function that counts the prime NPPPN: , .... 3 . 12 3 N numbers n . While mathematicians have achieved many important Keywords-component; prime, semiprime, nth semiprime, next results concerning distribution of prime numbers, many are semiprime interested in semiprime properties as to counting prime and semiprime numbers not exceeding a given number. I. INTRODUCTION From [7, 8, 9], the formula for (2) ()N that counts the Securing data remains a concern for every individual and semiprime numbers not exceeding N is given by (1). every organization on the globe. In telecommunication, cryptography is one of the studies that permit the secure N x transfer of information [1] over the Internet. Prime numbers (2) (Ni ) 1 (1) have special properties that make them of fundamental i1 pi importance in cryptography. The core of the Internet security is based on protocols, such as SSL and TSL [2] released in 1994 This formula is based on the primes P , P , … and persist as the basis for securing different aspects of today's 1 2 Internet [3]. PN . N The Rivest-Shamir-Adleman encryption method [4], released in 1978, uses asymmetric keys for exchanging data. A Our contribution is of several folds. First, we present a formula to test the semiprimality of a given integer, this secret key S and a public key P are generated by the k k (2) recipient with the following property: A message enciphered formula is used to build a new function ()N that counts the semiprimes not exceeding a given integer N using by Pk can only be deciphered by Sk and vice versa. The only PPPN, ,.... 3 . Second, we present an explicit public key is publicly transmitted to the sender and used to 12 3 N encipher data that only the recipient can decipher. RSA is th based on generating two large prime numbers, say P and Q formula that identifies the n semiprime number. And finally and its security is enforced by the fact that albeit the fact that we give a formula that finds the next semiprime to any given number. the product of these two primes n P Q is published, it is of enormous difficulty to factorize n . II. SEMIPRIMALITY TEST A semiprime or (2 almost prime) or (pq number) is a With the same complexity Ox() as the Sieve of natural number that is a product of 2 primes not necessary distinct. The semiprime is either a square of prime or square Eratosthenes to test a primality of a given number x , we free. Also the square of any prime number is a semiprime employ the Euclidean Algorithm and the fact that every prime number. number greater than 3 has the form 61k and without www.ijcit.com 49 International Journal of Computer and Information Technology (ISSN: 2279 – 0764) Volume 06 – Issue 01, January 2017 previous knowledge about any prime, we can test the primality By the fundamental theorem of arithmetic, a prime of x 8 using the following procedure: number p such that p divides a . That means p a3 N , Define the following functions but p divides a and a divides N , hence p divides N with the property pN 3 . 1 x x x x (2) Tx0 () Lemma 1: tells that, if N is not divisible by any prime 2 2 2 3 3 pN 3 , then N has at most 2 prime factors, i.e., N is prime or semiprime . Using the proposed primality test defined by x Tx()we construct the semiprimality test as follows: 6 1 xx Tx() (3) For x 8 , define the functions Kx1() and Kx2 () as 1 x k1 6kk 1 6 1 follows: 6 3 x 1 xx Kx1() = (7) 3 pp x ()x i1 ii 6 1 xx Tx() (4) 3 x 2 x k1 6kk 1 6 1 1 x x x Kx2 () = 1 T (8) 3 ()x i1 pi p i p i 6 Where ()x is the classical prime counting function TTT0 1 2 Tx() (5) presented in (6), Tx() is the same as in Theorem 1. Obviously 3 Tx() is independent of any previous knowledge of the prime Where x and x are the floor and the ceiling functions numbers. of the real number x respectively. Lemma 2: If Kx1( ) 0 , then x is divisible by some We have the following theorem which is analog to that prime px 3 . appeared in [10] with slight modification and the details of the i proof are exactly the same. xx Theorem 1: Given any positive integer x 7 , then Proof. For Kx1( ) 0 , we have 0 for some ppii 1. x is prime if and only if Tx( ) 1 3 pi , then x is divisible by pi for some pxi . 2. x is composite if and only if Tx( ) 0 Lemma 3: If Kx( ) 1 ,then x has at most 2 prime 3. For x 7 1 3 factors exceeding x . xx75 xx 66 Proof. If Kx( ) 1 , then 1 for all ()4x T (6 j 7) T (6 j 5) (6) 1 ppii jj11 3 counts the number of primes not exceeding x . pxi therefore by Lemma 1: , x is not divisible by any Now we proof the following Lemma: 3 prime pi x, therefore x has at most two prime factors Lemma 1: If N is a positive integer with at least 3 exceeding 3 x. factors, then there exists a prime p such that: Lemma 4: If Tx( ) 0 and Kx1( ) 1 , then x is pN 3 and p divides N semiprime and Kx2 ( ) 0 . Proof. If N has at least 3 factors then it can be represented Proof. If Kx( ) 1 , then x has at most 2 prime factors but as: N a.. b c with the assumption 1 abc , we deduce 1 Tx( ) 0 which means that x is composite, hence x has 3 3 that Na or aN . exactly two prime factors and both factors are greater than www.ijcit.com 50 International Journal of Computer and Information Technology (ISSN: 2279 – 0764) Volume 06 – Issue 01, January 2017 1. Tx( ) 0 and Kx1( ) 1 3 xx 3 x and 10 for each prime pxi , ppii or therefore Kx( ) 0 . 2 2. Tx( ) 0 , Kx1( ) 0 and Kx2 ( ) 1 Lemma 5: If Tx( ) 0 and Kx1( ) 0 , then x is a Proof. If x is semiprime, then x pq where p and q are semiprime number if and only if Kx2 ( ) 1 . two primes. If p and q both are greater than 3 x then Tx( ) 0 and 3 pq 3 1 pq pq pq K( pq ) 1 1 33pq i1 ppii pq if x p q where p' and q ' are two primes such that px' 3 and qx' 3 then Tx( ) 0 and 3 pq'' 1p ' q ' p ' q ' K1( p ' q ') 0 3 pp'' pq'' i1 pq''''p q because 0 and pp'' Figure 1: MATLAB code for the computation of K1 and K2 3 pq'' 1p ' q ' p ' q ' p ' q ' K2 ( p ' q ') 1 T 1 3 p''' p p Proof. If Tx( ) 0 and Kx( ) 0 then x divides a pq'' i1 1 prime pN 3 , but x is semiprime that means x pq and q p'''''' q p q p q because 1(T ) q ' q '1(')1. T q is prime number hence for prime ppi and x pq we have: p''' p p x x x pq pq pq The converse can be proved by the same arguments. 1TT 1 1 p p p p p p i i i Corollary 1 A positive integer x 7 is Consequently, Kx( ) 1 because at least one of the terms semiprime if and only if 2 K( x ) K ( x ) T ( x ) 1. is not zero. 12 Proof. A direct consequence of the previous theorem and x x x Conversely, if Kx2 ( ) 1 then 1 T is not lemmas. pi p i p i x III. SEMIPRIME COUNTING FUNCTION zero for some i and then x p q and T 1for some i pi pq Notice that the triple (T ( x ), K12 ( x ), K ( x )) have only the prime px 3 then Ti T( q ) 1 hence q is a prime i following 4 possible cases only: pi number and x is a semiprime number. Case 1. (T ( x ), K12 ( x ), K ( x )) (1,1,0) indicates that Figure 1 shows the MATLAB code for the computation of x is prime number.