About connection of one matrix of composite numbers with Legendre’s

Garipov Ilshat Ilsurovich Russia, Republic of Tatarstan, Naberezhnye Chelny e-mail: [email protected].

Abstract

Scientific paper is devoted to establish connection of T -matrix – matrix of composite numbers 6h ± 1 in special view – with Legendre’s conjecture. Keywords: T -matrix, prime numbers, leading element, upper and lower defining elements of number, ¾active¿ set for numbers (m − 1)4 and m4, ¾critical¿ element for numbers (m − 1)4 and m4, Legendre’s conjecture, ¾Weak¿ and ¾Strong¿ .

List of symbols

N0 – set of all natural numbers with zero. N – set of all natural numbers. Z – set of all integers. P – set of all prime numbers. R – set of all real numbers. T – matrix comprising all defining and all not defining elements. Te – set of all elements of T-matrix. D(b) – T -matrix upper defining element of number b. d(b) – T -matrix lower defining element of number b.

Dk(b) – upper defining element of number b in k-row (k > 1) of T -matrix.

dk(b) – lower defining element of number b in k-row (k > 1) of T -matrix. W (b) – T -matrix upper element of number b. arXiv:2104.06261v1 [math.GM] 7 Apr 2021 w(b) – T -matrix lower element of number b.

Wk(b) – upper element of number b in k-row (k > 1) of T -matrix.

wk(b) – lower element of number b in k-row (k > 1) of T -matrix.

DT – set of all defining elements of T -matrix.

nDT – set of all not defining elements of T -matrix.

MT – set of all leading elements of T -matrix.

DTk – set of all defining elements in k-row (k > 1) of T -matrix. π(x) – function counting the number of prime numbers less than or equal to x ∈ R.

1 πMT (x) – function counting the number of T -matrix leading elements less than or equal to x ∈ R.

#k(a) – number of element a in k-row of T -matrix. 4 4 H(m−1)4, m4 – ¾active¿ set for numbers (m − 1) , m . 4 4 C(m−1)4, m4 – ¾critical¿ element for numbers (m − 1) , m .

νk(x) – function counting the number of elements, less than or equal to x ∈ R, in k-row of T -matrix. ν(x) – function counting the number of naturals of the form 6h ± 1, less than or equal to x ∈ R. a%b – remainder after dividing a ∈ N by b ∈ N. 2 2 qm – number of prime numbers between m and (m + 1) .

Introduction 1. T -matrix

We construct a matrix T ≡ (a(k; n))∞×∞, where a(k; n) is a T -matrix element located in k-th row, n-th column and defined as follows:  jnk n − 1 a(k; n) ≡ p(k) · 5 + 2 · + 4 · , 2 2

∞ where p(k) is the k-th element of sequence (p(k))k=1 of prime numbers:

p(k) ≡ pk+2, (1) where pi is the i-th in sequence of all prime numbers (see [1]). ∞ Let (f(n))n=1 is a numerical sequence, where a common member f(n) is defined as follows: 3 − (−1)n f(n) ≡ 3n + . 2 THEOREM 1.1. (∀k,n ∈ N)(a(k; n) = p(k) · f(n)) . (2) DEFINITION 1.1. An element a(k; n) of matrix T is called defining if 1) a(k; n) is not divisible by 5; 2) a(k; n) can be expressed as a product of some two prime numbers, that is

5 6 |a(k; n) ∧ (∃p1,p2 ∈ P)(a(k; n) = p1 · p2). (3) DEFINITION 1.2. An element a(k; n) of matrix T is called not defining if he does not satisfy condition (3). DEFINITION 1.3. An element a(k; n) of matrix T is called leading if

a(k; n) = p2(k).

2 DEFINITION 1.4. A T -matrix is called matrix comprising all defining and not defining elements. ∞ LEMMA 1.2. (f(n))n=1 is a sequence of all numbers of the form 6h ± 1: 5; 7; 11; 13; 17; 19; 23; 25; ... ; 6h − 1; 6h + 1; ....

2 ∞ PROPERTY 1.1. The sequence (p (k))k=1 of T -matrix leading elements is ascending. The simplest properties and basic theorems about elements of T -matrix are proved in [1].

2. About a T -matrix upper defining element of real number DEFINITION 2.1. A T -matrix defining element D(b) is called an upper defining element of number b ∈ R : b > 49, if

D(b) = min a(k1; n), a(k1;n)∈DT a(k1;n)>b n∈N where k1 is defined by condition 2 2 p (k1) = max p (k). 2 p (k)6b k>1 DEFINITION 2.2. A T -matrix defining element d(b) is called a lower defining element of number b ∈ R : b > 49, if

d(b) = max a(k2; n), a(k2;n)∈DT a(k2;n)1

DEFINITION 2.3. A T -matrix defining element Dk(b) is called an upper defining element 2 of number b ∈ R : p (k) 6 b, in k-row (k > 1) of T -matrix if

Dk(b) = min a(k; n). a(k;n)∈DT a(k;n)>b n∈N

DEFINITION 2.4. A T -matrix defining element dk(b) is called a lower defining element of number b ∈ R : p2(k) < b, in k-row (k > 1) of T -matrix if

dk(b) = max a(k; n). a(k;n)∈DT a(k;n) 49, if

3 W (b) = min a(k1; n), a(k1;n)∈Te a(k1;n)>b n∈N where k1 is defined by condition 2 2 p (k1) = max p (k). 2 p (k)6b k>1 DEFINITION 2.6. A T -matrix element w(b) is called a lower element of number b ∈ R : b > 49, if

w(b) = max a(k2; n), a(k2;n)∈Te a(k2;n)1

DEFINITION 2.7. A T -matrix element Wk(b) is called an upper element of number b ∈ R : 2 p (k) 6 b, in k-row (k > 1) of T -matrix if

Wk(b) = min a(k; n). a(k;n)∈Te a(k;n)>b n∈N

DEFINITION 2.8. A T -matrix element wk(b) is called a lower element of number b ∈ R : p2(k) < b, in k-row (k > 1) of T -matrix if

wk(b) = max a(k; n). a(k;n)∈Te a(k;n)

(∀k > 1) (∀n > 1) (a(k; n) ∈ DT ⇔ f(n) ∈ P\{2; 3; 5}) . (4) PROOF. Choose any k-row (k > 1) and any n-column (n > 1) of T -matrix.

Necessity. Let a(k; n) ∈ DT . By Definition 1.1, that means that

5 6 |a(k; n) ∧ (∃ p1, p2 ∈ P)(a(k; n) = p1 · p2). Then by rule (1), Lemma 1.2 and Theorem 1.1,

p1 = p(k) ∈ P\{2; 3; 5} ∧ p2 = f(n) ∈ P\{2; 3; 5}.

It follows that f(n) ∈ P\{2; 3; 5}. The necessity is proved.

4 Sufficiency. Let f(n) ∈ P\{2; 3; 5}. It is clear that p(k) ∈ P\{2; 3; 5} for k > 1.

p(k), f(n) ∈ P\{2; 3; 5} ⇒

(2) ⇒ p(k) · f(n) = a(k; n) ∧ p(k), f(n) ∈ P ∧ 5 6 |a(k; n) ⇒

(3) ⇒ 5 6 |a(k; n) ∧ (∃ p1,p2 ∈ P)(a(k; n) = p1 · p2) ⇔ a(k; n) ∈ DT . The sufficiency is proved. Lemma 2.1 is proved. THEOREM 2.2 (about the ¾transition down¿ of T -matrix defining element).

2 (∀k; n ∈ N) p (k) < a(k; n) ∧ a(k; n) ∈ DT ⇒

2 2 2  ⇒ (∃! j ∈ N) k < j ∧ a(k; n) < p (j) ∧ a(j;#k(p (k))) = a(k; n) ∧ a(j; n) = p (j) . (5) PROOF. Existence. It is established in [1]. Uniqueness. Suppose,

2 (∀k; n ∈ N)(p (k) < a(k; n) ∧ a(k; n) ∈ DT ⇒

2 2 ⇒ (∃ j1, j2 ∈ N)(j1 6= j2 ∧ k < j1 ∧ k < j2 ∧ a(k; n) < p (j1) ∧ a(k; n) < p (j2) ∧

2 2 ∧ a(j1;#k(p (k))) = a(k; n) ∧ a(j2;#k(p (k))) = a(k; n) ∧

2 2 ∧ a(j1; n) = p (j1) ∧ a(j2; n) = p (j2))).

2 2 a(j1;#k(p (k))) = a(k; n) ∧ a(j2;#k(p (k))) = a(k; n) ∧ j1 6= j2 ⇒

2 2 (2) ⇒ a(j1;#k(p (k))) = a(j2;#k(p (k))) ∧ j1 6= j2 ⇔

2 2 ⇔ p(j1) · f(#k(p (k))) = p(j2) · f(#k(p (k))) ∧ j1 6= j2 ⇔

⇔ p(j1) = p(j2) ∧ j1 6= j2 ⇔ j1 = j2 ∧ j1 6= j2.

As a result, a contradiction. The uniqueness is established. Theorem 2.2 is proved. COROLLARY 2.3. Let a(k; n), a(j; n) are T -matrix elements from Theorem 2.2. Then,

a(k; n) a(k; n) − p(k) = p(j) − . p(k) p(j)

PROOF. From №1 in [1], we get

 a(k; n) (∃h ∈ ) p2(k) + 2h · p(k) = a(k; n) ⇔ (∃h ∈ ) p(k) + 2h = . N N p(k)

5 2 2 a(k; n) (5) a(j;# (p (k))) (2) p(j) · f(# (p (k))) 2h = − p(k) = k − p(k) = k − p(k) = p(k) p(k) p(k)

2 p(j) · p(k) (2) a(j;# (p (k))) (5) a(k; n) = − f(# (p2(k))) = p(j) − k = p(j) − . p(k) k p(j) p(j)

Corollary 2.3 is proved. CONCLUSION 2.1. Subject to the conditions of Theorem 2.2, there are the following equalities with some h ∈ N: 1) p2(k) + 2h · p(k) = a(k; n).

2) a(k; n) + 2h · p(j) = p2(j).

− Further, let gk ≡ p(k + 1) − p(k). LEMMA 2.4. 2 − 2 (∀k > 1)(p (k) + gk · p(k) = Dk(p (k))). PROOF. Choose any k-row (k > 1) of T -matrix. Given Theorem 1.1, assume that

2 Dk(p (k)) = p(k) · f(n) with some n > 1.

D ⊂D 2 Tk T 2 (4) Dk(p (k)) ∈ DTk ⇒ Dk(p (k)) ∈ DT ⇔ f(n) ∈ P\{2; 3; 5}. It follows from Definition 2.3 that the defining elements of T -matrix don’t exist between the elements p2(k) and a(k; n). Therefore, f(n) = p(k + 1). Then,

2 − 2 − Dk(p (k)) = p(k) · p(k + 1) = p(k) · (p(k) + gk ) = p (k) + gk · p(k). Lemma 2.4 is proved. COROLLARY 2.5.

2 − 2 (∀k > 1)(Dk(p (k)) + gk · p(k + 1) = p (k + 1)). PROOF. Choose any k-row (k > 1) of T -matrix. Using Lemma 2.4, we get

2 − 2 − − Dk(p (k)) + gk · p(k + 1) = p (k) + gk · p(k) + gk · p(k + 1) =

2 − 2 = p (k) + gk · (p(k) + p(k + 1)) = p (k) + (p(k + 1) − p(k)) · (p(k + 1) + p(k)) = = p2(k) + p2(k + 1) − p2(k) = p2(k + 1).

Corollary 2.5 is proved. COMMENT. It follows from Definition 2.1 and Definition 2.3 that

2 2 (∀k > 1)(Dk(p (k)) = D(p (k))).

THEOREM 2.6 (about the ¾transition up¿ of T -matrix defining element).

6 2 (∀j; n ∈ N) a(j; n) < p (j) ∧ a(j; n) ∈ DT ⇒

2 2 2  ⇒ (∃! k ∈ N) k < j ∧ p (k) < a(j; n) ∧ a(k;#j(p (j))) = a(j; n) ∧ a(k; n) = p (k) . PROOF. Existence. Choose any defining element a(j; n) that is smaller than the leading element p2(j) in j-row of T -matrix. Then it follows from Theorem 1.1 and Definition 1.1 that

a(j; n) = p(j) · f(n) ∧ p(j), f(n) ∈ P\{2; 3; 5}.

∞ Therefore, the prime number f(n) > 5 is an element of sequence (p(k))k=1:

(∃ k ∈ N)(p(k) = f(n)) . (6) (2) (6) 1) a(j; n) < p2(j) ⇔ p(j) · f(n) < p2(j) ⇔ p(j) · p(k) < p2(j) ⇔

⇔ p(k) < p(j) ⇔ k < j.

(6) (2) 2) p(k) < p(j) ⇔ p2(k) < p(j) · p(k) ⇔ p2(k) < p(j) · f(n) ⇔ p2(k) < a(j; n).

2 (2) 2 (6) (2) 3) a(k;#j(p (j))) = p(k) · f(#j(p (j))) = p(k) · p(j) = p(j) · p(k) = p(j) · f(n) = a(j; n). (2) (6) 4) a(k; n) = p(k) · f(n) = p2(k). Uniqueness. Suppose,

2 (∀j; n ∈ N)(a(j; n) < p (j) ∧ a(j; n) ∈ DT ⇒

2 2 ⇒ (∃ k1, k2 ∈ N)(k1 6= k2 ∧ k1 < j ∧ k2 < j ∧ p (k1) < a(j; n) ∧ p (k2) < a(j; n) ∧

2 2 ∧ a(k1;#j(p (j))) = a(j; n) ∧ a(k2;#j(p (j))) = a(j; n) ∧

2 2 ∧ a(k1; n) = p (k1) ∧ a(k2; n) = p (k2))).

2 2 a(k1;#j(p (j))) = a(j; n) ∧ a(k2;#j(p (j))) = a(j; n) ∧ k1 6= k2 ⇒

2 2 (2) ⇒ a(k1;#j(p (j))) = a(k2;#j(p (j))) ∧ k1 6= k2 ⇔

2 2 ⇔ p(k1) · f(#j(p (j))) = p(k2) · f(#j(p (j))) ∧ k1 6= k2 ⇔

⇔ p(k1) = p(k2) ∧ k1 6= k2 ⇔ k1 = k2 ∧ k1 6= k2.

As a result, a contradiction. The uniqueness is established. Theorem 2.6 is proved. LEGENDRE’S CONJECTURE. 2 2 (∀m ∈ N)(∃p ∈ P) m < p < (m + 1) . PROPOSITION 2.7. Any real number x can be uniquely expressed as a sum of integer part (entire) and fractional part (mantissa) of number x:

7 x = bxc + {x}. PROPERTY 2.1 (property of number’s entire).

(∀x ∈ R)(x − 1 < bxc 6 x). (7) PROPERTY 2.2 (property of number’s mantissa).

(∀x ∈ R) (0 6 {x} < 1). PROPERTY 2.3.

(∀n ∈ N0)(∀x ∈ R)(n · bxc 6 bn · xc) (see [2]). (8) THEOREM 2.8 (fundamental theorem of arithmetic). Every positive integer except the number 1 can be represented in exactly one way apart from rearrangement as a product of one or more primes (see [3]). PROPERTY 2.4. (∀x ∈ R : x > 0) (ν(x) = ν (bxc)) . (9)

PROOF. Choose any real number x > 0. Then, using Proposition 2.7 and Property 2.2, we get

ν(x) = ν (bxc + {x}) = ν (bxc) .

Property 2.4 is proved. THEOREM 2.9.   x  (∀k ∈ )(∀x ∈ : x 0) ν (x) = ν . (10) N R > k p(k)

PROOF. Fix any k-row of T -matrix and any real number x > 0. Select the elements

a(k; n) ∈ Te : a(k; n) 6 x, n ∈ N. Using Theorem 1.1 for each of them, we get the numbers f(n): a(k; n) x f(n) = . (11) p(k) 6 p(k)

By Lemma 1.2, the numbers f(n) have the form 6h ± 1. Then, given (11), the number x ν( p(k) ) of such f(n) is equal to the number νk(x) of elements, less than or equal to x, in k-row of T -matrix. Theorem 2.9 is proved. COROLLARY 2.10.

(∀k ∈ N)(∀x ∈ R : x > 0) (νk(x) = νk (bxc)) .

PROOF. Fix any k-row of T -matrix and any real number x > 0. Then,

8 (10)  x  (9)  x  (10)   x  (8) ν (x) = ν = ν = ν p(k) · k p(k) p(k) k p(k) 6  x  ν p(k) · = ν (bxc) . 6 k p(k) k

(7) It is clear that νk(x) > νk (bxc). Thus,

νk(x) 6 νk (bxc) ∧ νk(x) > νk (bxc) ⇒ νk(x) = νk (bxc) . Corollary 2.10 is proved. PROPOSITION 2.11.  m + 2 m%6 m%6  (∀m ∈ ) ν(m) = − + − 1 . (12) N 3 4 5

PROOF. The exact formula of space complexity C(m) of T -matrix - based algorithm (algorithm №1) for finding all the prime numbers less than or equal to a given natural number m > 5 was obtained in [1]:  m + 2 m%6 m%6 (∀m ∈ : m 5) C(m) = − + . N > 3 4 5

This formula also takes into account the number 0 for correct numbering of natural numbers of the form 6h ± 1 less than or equal to m. Discarding the number 0, we get

(∀m ∈ N : m > 5)(ν(m) = C(m) − 1). (13) m + 2 m%6 m%6  (∀m ∈ {1; 2; 3; 4}) − + − 1 = 0 ∧ ν(m) = 0 . 3 4 5

Proposition 2.11 is proved. Further, we will present a method №1 which allows to find a T -matrix upper defining 4 4 2 2 element D(m ) of number m (m ∈ N : m > 3) by invoking that between (m − 1) and m there is the prime number. Also note that a prime number between m2 and (m + 1)2 is the intermediate result of method №1. The important comments within T -matrix are also given in method №1. Description of method №1. Input: m ∈ N : m > 3. Step 1. Using Proposition 2.11, compute a number n of numbers of the form 6h ± 1 less than or equal to m2: m2 + 2 m2%6 m2%6 n ≡ ν(m2) = − + − 1. 3 4 5

Step 2. Find a prime number p(k1):

9 p(k1) = max p(k). (14) (m−1)21 2 2 2 2 It follows that (m−1) < p(k1) < m . These inequalities are strict, since (m−1) , m ∈/ P. Within T -matrix,

2 2 4 2 4 2 (m − 1) < p(k1) < m ⇔ (m − 1) < p (k1) < m , where p (k1) ∈ MT .

Test the primality of numbers f(n − i) that lie between (m − 1)2 and m2 starting at i = 0 with a step 1 until a number ∆n ∈ N0 is found:

f(n − ∆n) ∈ P\{2; 3; 5}. For numbers f(n − i)(i = 0; ∆n) we use the Lenstra-Pomerance (modifica- tion of polynomial-time Agrawal–Kayal–Saxena (AKS) primality test, see [4], [5]). Note that by Lemma 1.2, the numbers f(n − i) have the form 6h ± 1. Thus,

p(k1) = f(n − ∆n).

4 4 Step 3. Compute a number n0 of T -matrix upper element W (m ) of m (in k1-row of T -matrix). 4 Let’s say that a(k1; n0) ≡ W (m ). Then by Definition 2.5,

a(k1; n0) = min a(k1; n). a(k1;n)∈Te 4 a(k1;n)>m n∈N It follows that 4 νk1 (m ) + 1 = νk1 (a(k1; n0)) ∧ n0 = νk1 (a(k1; n0)).

Then, 4 n0 = νk1 (m ) + 1.

 4   4   4  4 (10) m (9) m m νk1 (m ) = ν = ν ⇒ ν = n0 − 1. p(k1) p(k1) p(k1)

 4  (7) 4 (14) 4 m m m 2 2 (13) > − 1 > 2 − 1 = m − 1 > 3 − 1 = 8 > 5 ⇒ p(k1) p(k1) m

 m4   m4   m4  ⇒ ν = C − 1 ⇔ n0 − 1 = C − 1 ⇔ p(k1) p(k1) p(k1)

 m4  ⇔ n0 = C . p(k1) Step 4. Compute a T -matrix element D(m4), and D(m4) < (m + 1)4.

10 Test way to calculate the element D(m4). Given Definition 1.1, finding the element 4 a(k1,n0+i) D(m ) is reduced to test the primality of numbers f(n0 + i) = starting at i = 0 p(k1) with a step 1 until a number ∆n0 ∈ N0 is found:

f(n0 + ∆n0) ∈ P\{2; 3; 5}. In turn, by Lemma 2.1,

f(n0 + ∆n0) ∈ P\{2; 3; 5} ⇔ a(k1,n0 + ∆n0) ∈ DT .

For numbers f(n0 + i)(i = 0; ∆n0) use the Lenstra-Pomerance primality test. Using Theorem 1.1, compute the element D(m4):

4 D(m ) ≡ a(k1,n0 + ∆n0) = p(k1) · f(n0 + ∆n0).

2 We expect that the received prime number p(j) ≡ f(n0 + ∆n0) lies between m and (m + 1)2. Output: T -matrix upper defining element D(m4) of number m4. Next, we will use the Lagarias-Odlyzko analytical method (about the method see [5], [6]) 4 to know which k1, j-rows of T -matrix contain the element D(m ).

The calculation of numbers k1, j-rows of T -matrix is reduced to calculation of numbers k1 of p(k1), j of p(j) in sequence of all prime numbers respectively. Clear that

k1 = π(p(k1)) ∧ j = π(p(j)).

Using rule (1),

k1 = k1 − 2 ∧ j = j − 2.

Consider now the inverse problem. Suppose that Step 1 and Step 2 of method №1 are done, but we already know which elements are defining, and which elements are not defining in T -matrix. In this case, a prime number p(j) that lies between m2 and (m + 1)2 can be found in two ways.

Way №1 (hard). D(m4) − p2(k ) p(j) = h + ph2 + D(m4), where h = 1 . (15) 2 · p(k1) PROOF. Compute a number h ∈ N on the basis of Conclusion 2.1, 1):

4 2 2 4 4 2 D(m ) − p (k1) p (k1) + 2h · p(k1) = D(m ) ⇔ 2h · p(k1) = D(m ) − p (k1) ⇔ h = . 2 · p(k1)

On the basis of Conclusion 2.1, 2),

11 D(m4) + 2h · p(j) = p2(j) ⇔ p2(j) − 2h · p(j) − D(m4) = 0. (16)

Solve the reduced quadratic equation (16) in the unknown p(j).

2h ± p(−2h)2 − 4 · (−D(m4)) 2h ± p4h2 + 4 · D(m4) p (j) = = = 1,2 2 2

2h ± 2 · ph2 + D(m4) = = h ± ph2 + D(m4), h2 + D(m4) > 0. 2 In turn, h − ph2 + D(m4) < 0. Really, √ D(m4) > 0 ⇔ D(m4) + h2 > h2 ⇔ pD(m4) + h2 > h2 ⇔

⇔ pD(m4) + h2 > |h| .

h > 0 ⇒ pD(m4) + h2 > h ⇔ h − ph2 + D(m4) < 0. p Thus, given p(j) > 5, the root p(j) = h− h2 + D(m4) of equation (16) is not considered. Show that h + ph2 + D(m4) > 5. It follows from Definition 2.1 that m4 < D(m4).

p √ √ √ h + h2 + D(m4) > h + h2 + m4 > h + h2 + 34 > h + 34 = h + 9 > 5.

In result, p(j) = h + ph2 + D(m4) is an appropriate root of equation (16). The correctness of formula (15) is proved. Way №2 (easy). D(m4) p(j) = . (17) p(k1) Formula (17) can be obtained from the proof of Theorem 2.2 (see [1]). Verify an equation of the prime numbers p(j) found in 2 ways.

2 4 2 4 2 4 Verification. p (k1) + 2h · p(k1) = D(m ) ⇔ (p (k1) + 2h · p(k1)) · D(m ) = D (m ) ⇔

4 2 4 2 4 4 2 4 4 D(m ) D (m ) ⇔ p (k1) · D(m ) + 2h · p(k1) · D(m ) = D (m ) ⇔ D(m ) + 2h · = 2 ⇔ p(k1) p (k1)

2 4 4 2 4 4 4 D (m ) D(m ) 4 2 D (m ) D(m ) 2 ⇔ D(m ) = 2 − 2h · ⇔ D(m ) + h = 2 − 2h · + h ⇔ p (k1) p(k1) p (k1) p(k1)

s D(m4) 2 D(m4) 2 ⇔ D(m4) + h2 = − h ⇔ pD(m4) + h2 = − h ⇔ p(k1) p(k1)

12 4 p D(m ) ⇔ D(m4) + h2 = − h . p(k1)

4 4 2 4 D(m ) D(m ) p (k1) + 2h · p(k1) = D(m ) ⇔ p(k1) + 2h = ⇔ p(k1) + h = − h. p(k1) p(k1)

D(m4) p(k1) + h > 0 ⇒ − h > 0 ⇒ p(k1)

D(m4) D(m4) ⇒ pD(m4) + h2 = − h ⇔ h + ph2 + D(m4) = . p(k1) p(k1) We will put forward a following conjecture. CONJECTURE 2.1.

 4  2 D(m ) 2 (∀m ∈ N : m > 3) m < < (m + 1) , p(k1) where k1 is defined by condition (14). If Conjecture 2.1 is true, then for both ways:

m4 < D(m4) < p2(j) < (m + 1)4.

Therefore, m2 < p(j) < (m + 1)2. THEOREM 2.12. 4 (∀m ∈ N : m > 3) (p(k1) 6 | m ), where k1 is defined by condition (14). 4 PROOF. Suppose otherwise: (∃m ∈ N : m > 3) (p(k1) |m ). Given Theorem 2.8, we present a number m as

w Y m = pβi , where w, α , β ∈ ; i = 1; w. αi i i N i=1

4 4 w ! w βi ! w βi 4 Y Y Y Y Y p(k1) | m m4 = pβi = p = p4 ⇒ αi αi αi i=1 i=1 j=1 i=1 j=1

⇒ (∃i ∈ N : 1 6 i 6 w)(pαi = p(k1)) ⇔ p(k1) | m.

Without loss of generality, assume that m = p(k1) · m1, m1 ∈ N. It is known that (∀i ∈ N)(pi+1 < 2 · pi) (see [7]). Therefore, using (1), we get

2 2 2 p(k1 + 1) < 2 · p(k1) < p (k1) · m1 = m .

As a result, a contradiction to the maximality of the prime number p(k1) from (14).

13 Theorem 2.12 is proved. PROPOSITION 2.13. 4 4 νk1 (D(m )) − νk1 (m ) = O(m), (18) where k1 is defined by condition (14). PROOF.Given Conjecture 2.1, let’s say that

D(m4) < p2(j) < (m + 1)4.

 4   4   4  4 4 (10) D(m ) m (17),(9) m νk1 (D(m )) − νk1 (m ) = ν − ν = ν(p(j)) − ν . p(k1) p(k1) p(k1)

 n%6 n%6  (∀n ∈ ) − + ∈ {−1; 0} . N 4 5

Then,

4  m  (12) p(j) + 2 p(j)%6 p(j)%6 ν(p(j)) − ν = − + − 1− p(k1) 3 4 5

 bm4/p(k )c + 2 bm4/p(k )c %6 bm4/p(k )c %6  − 1 − 1 + 1 − 1 3 4 5 6

p(j) + 2 bm4/p(k )c + 2 bm4/p(k )c %6 bm4/p(k )c %6 − 1 − 1 − 1 − 1 + 1 = 6 3 3 5 4

p(j) + 2 bm4/p(k )c + 2 bm4/p(k )c %6 bm4/p(k )c %6 = − 1 − 1 − 1 3 3 5 4 6

p(j) + 2 bm4/p(k )c + 2 (7) p(j) + 2 bm4/p(k )c + 2 − 1 + 1 − 1 + 1. 6 3 3 6 3 3

bm4/p(k )c + 2 (7) 1  m4  2 1  m4  1 1 > · + − 1 = · − ⇒ 3 3 p(k1) 3 3 p(k1) 3

bm4/p(k )c + 2 1 1  m4  ⇒ − 1 < − · ⇒ 3 3 3 p(k1)

 m4  p(j) 2 1 1  m4  ⇒ ν(p(j)) − ν < + + − · + 1 ⇔ p(k1) 3 3 3 3 p(k1)

 m4  p(j) 1  m4  ⇔ ν(p(j)) − ν < − · + 2. (19) p(k1) 3 3 p(k1)

14  m4  (7) m4  m4  m4  m4  > − 1 ⇔ − < 1 − ⇒ ν(p(j)) − ν < p(k1) p(k1) p(k1) p(k1) p(k1)

p(j) 1  m4  p(j) 1 1 m4 1 1 m4 7 < + · 1 − + 2 = + − · + 2 < · (m + 1)2 − · + . 3 3 p(k1) 3 3 3 p(k1) 3 3 p(k1) 3

4 (14) 4 4  4  m m 2 m 2 m > 2 = m ⇔ − < − m ⇒ ν(p(j)) − ν < p(k1) m p(k1) p(k1)

1 1 7 1 7 < · (m + 1)2 − · m2 + = · ((m + 1)2 − m2) + = 3 3 3 3 3

1 7 1 7 2m 8 = · (m + 1 + m) · (m + 1 − m) + = · (2m + 1) + = + < 3 3 3 3 3 3

2m 3m 5 5 < + = · m (m 3) ⇒ ν (D(m4)) − ν (m4) < · m (m 3). (20) 3 3 3 > k1 k1 3 >

4 4 It follows from (20) that νk1 (D(m )) − νk1 (m ) = O(m). Proposition 2.13 is proved. PROPOSITION 2.14. The asymptotic of method №1 is

 6 O(1)  O m · (log2 m) · log2 (log2 m) . PROOF. Given Conjecture 2.1, let’s say that

D(m4) < p2(j) < (m + 1)4.

Let tr(m) – number of actions in Step r of method №1, r = 1; 4; t(m) – time complexity of method №1 at input m ∈ N : m > 3. Step 1. The number of digits (length) of m equals blg mc + 1. (7) m>3 3 blg mc + 1 6 lg m + 1 < lg m + lg(m ) = lg m + 3 · lg m = 4 · lg m. (21) Given (21), the multiplying of m by itself requires not more than O(lg2 m) steps. All other arithmetic operations over intermediate results equire not more than O(lg m) steps. Therefore, the computing a number n of numbers of the form 6h ± 1 less than or equal to m2 is going to take not more than O(lg2 m) steps. Thus, there may be

2 t1(m) = O(lg m).

6 Step 2. The asymptotic time complexity of Lenstra-Pomerance primality test is Oe(log2 x) at input x (see [4]), where

O(1) Oe(y) = O y · (log2 y) . The largest possible number ∆(m) of numbers 6h±1, which lie between (m−1)2 and m2,

15 pass the primality test, equals ν(m2) − ν((m − 1)2). Then similar to (19), we find an upper estimate for ∆(m): m2 − (m − 1)2 (m + m − 1) · (m − m + 1) ∆(m) = ν(m2) − ν((m − 1)2) < + 2 = + 2 = 3 3 2m − 1 2m 5 2m 2m 4 4 = + 2 = + < + = · m (m 3) ⇒ ∆(m) < · m (m 3). (22) 3 3 3 3 3 3 > 3 >

Let f(¯n) = max f(n). 2 2 (m−1) 6f(n)6m n∈N

Introduce t2, i+1(m) – number of actions in Step 2 of method №1, when the number f(¯n − i), 0 6 i 6 ∆(m) − 1, passes the primality test. Then, for t2, i+1(m), i = 0; ∆(m) − 1, there are estimates:

6  6 O(1) 6  t2, i+1(m) = Oe(log2 f(¯n − i)) = O (log2 f(¯n − i)) · log2 (log2 f(¯n − i)) .

So, there exist constants C1 > 0,C2 > 0 and m0 ∈ N : m0 > 3, such that for all m > m0:

6 C2 6 t2, i+1(m) 6 C1 · (log2 f(¯n − i)) · log2 (log2 f(¯n − i)), i = 0; ∆(m) − 1.

6 C2 6 6 2 C2 6 2 C1 · (log2 f(¯n − i)) · log2 (log2 f(¯n − i)) 6 C1 · (log2(m )) · log2 (log2(m )) = m 3 6 C2 > 6 6 3 C2 = C1 · (2 · log2 m) · (6 · log2(2 · log2 m)) < C1 · 2 · (log2 m) · (6 · log2(log2 m)) =

6 6 6 C2 6 C2 6 C2 6 = C1 · 2 · (log2 m) · (3 · log2(log2 m)) = C1 · 2 · 3 · (log2 m) · log2 (log2 m).

6 C2 Introduce a constant C3 ≡ C1 · 2 · 3 . Then,

6 C2 6  (∀m > m0) t2, i+1(m) < C3 · (log2 m) · log2 (log2 m) , i = 0; ∆(m) − 1. It follows that

 6 O(1) 6  6 t2, i+1(m) = O (log2 m) · log2 (log2 m) = Oe(log2 m), i = 0; ∆(m) − 1.

Estimate the number of actions t2(m) in Step 2 of method №1 for all m > m0. ∆(m)−1 ∆(m)−1 ∆(m)−1 X X 6 6 X t2(m) = t2,i+1(m) = Oe(log2 m) = Oe(log2 m) · 1 = i=0 i=0 i=0

6 (22) 6  6 O(1) 6  = Oe(log2 m) · ∆(m) = Oe(log2 m) · O(m) = O (log2 m) · log2 (log2 m) · O(m) =

 6 O(1) 6    6 O(1)  = O m · (log2 m) · log2 (log2 m) = O O m · (log2 m) · log2 (log2 m) =

 6 O(1)   6 O(1)  = O m · (log2 m) · log2 (log2 m) ⇒ t2(m) = O m · (log2 m) · log2 (log2 m) .

16 Step 3. The multiplying of m by itself requires not more than O(lg2 m) steps. Then the multiplying of m2 by itself also requires not more than O(lg2 m) steps, since

O(lg2(m2)) = O(4 · lg2 m) = O(lg2 m).

Further,

(7) (14) 4 4 (blg(m )c + 1) · (blg p(k1)c + 1) 6 (lg(m ) + 1) · (lg p(k1) + 1) <

m 3 < (lg(m4) + 1) · (lg(m2) + 1) <> (lg(m4) + lg(m3)) · (lg(m2) + lg(m3)) =

= (lg(m7)) · lg(m5) = 7 · (lg m) · 5 · lg m = 35 · lg2 m.

4 It follows that the division m by p(k1) with remainder is going to take not more than O(lg2 m) steps. On the basis of (21), the asymptotic time complexity of computing the value of C(m) is O(lg m).

 4  (7)  4   4  m m (14) m m>3 lg 6 lg < lg 2 < p(k1) p(k1) (m − 1)

    m4 m4 < lg   = lg   = lg(3 · m2) lg(m3) = 3 · lg m.    2   2  6 m − 1 − √1 · m √m 3 3

4 4 Therefore, the computing a number n0 of T -matrix upper element W (m ) of number m 4 j m4 k 2 (in k1-row) with the computing m and is going to take not more than O(lg m) steps. p(k1) Thus, there may be

2 t3(m) = O(lg m).

Step 4. Let t4, i+1(m) – number of actions in Step 4 of method №1, when f(n0 + i), where 0 6 i 6 ∆n0, passes the primality test. Then, given the asymptotic time complexity of Lenstra-Pomerance primality test, for t4, i+1(m), i = 0; ∆n0, there are estimates:

6  6 O(1) 6  t4, i+1(m) = Oe(log2 f(n0 + i)) = O (log2 f(n0 + i)) · log2 (log2 f(n0 + i)) .

So, there exist constants C4 > 0,C5 > 0 and m0 ∈ N : m0 > 3, such that for all m > m0:

6 C5 6 t4, i+1(m) 6 C4 · (log2 f(n0 + i)) · log2 (log2 f(n0 + i)), i = 0; ∆n0. There are the following inequalities:

2 2 m < f(n0 + i) 6 p(j) < (m + 1) , i = 0; ∆n0. (23)

17 (14) 2 m4 m4 4 m4 Really, m = 2 < , where by Theorem 2.12, p(k1) 6 | m . So, ∈/ . m p(k1) p(k1) N

4 m a(k1,n0 + i) (2) < = f(n0 + i) , i = 0; ∆n0. p(k1) p(k1)

2 Therefore, m < f(n0 + i), i = 0; ∆n0. Clear that f(n0 + i) 6 p(j), i = 0; ∆n0, and

f(n0 + i) = p(j) ⇔ i = ∆n0.

Since (m + 1)2 ∈/ P, there is a strict inequality p(j) < (m + 1)2.

(23) (23) 6 C5 6 6 C5 6 C4 · (log2 f(n0 + i)) · log2 (log2 f(n0 + i)) 6 C4 · (log2 p(j)) · log2 (log2 p(j)) <

6 2 C5 6 2 < C4 · (log2((m + 1) )) · log2 (log2((m + 1) )) = m 3 6 C5 > = C4 · (2 · log2(m + 1)) · (6 · log2(2 · log2(m + 1))) <

2 6 2 C5 < C4 · (2 · log2(m )) · (6 · log2(2 · log2(m ))) = m 3 6 6 C5 > 6 6 5 C5 = C4 · 4 · (log2 m) · (6 · log2(4 · log2 m)) < C4 · 4 · (log2 m) · (6 · log2(log2 m)) =

6 6 6 C5 6 C5 6 C5 6 = C4 · 4 · (log2 m) · (5 · log2(log2 m)) = C4 · 4 · 5 · (log2 m) · log2 (log2 m).

6 C5 Introduce a constant C6 ≡ C4 · 4 · 5 . Then,

6 C5 6  (∀m > m0) t4, i+1(m) < C6 · (log2 m) · log2 (log2 m) , i = 0; ∆n0. It follows that  6 O(1) 6  6 t4, i+1(m) = O (log2 m) · log2 (log2 m) = Oe(log2 m), i = 0; ∆n0.

∆n0 ∆n0 ∆n0 X X 6 6 X 6 t4,i+1(m) = Oe(log2 m) = Oe(log2 m) · 1 = Oe(log2 m) · (∆n0 + 1). i=0 i=0 i=0 Note that on the basis of Lemma 2.1,

f(n0 + i) ∈/ P\{2; 3; 5} ⇔ a(k1; n0 + i) ∈/ DT ⇔ a(k1; n0 + i) ∈ nDT , i = 0; ∆n0 − 1. Therefore,

4 4 ∆n0 + 1 = νk1 (D(m )) − νk1 (m ).

∆n0 X 6 4 4 (18) 6 t4,i+1(m) = Oe(log2 m) · (νk1 (D(m )) − νk1 (m )) = Oe(log2 m) · O(m) = i=0

 6 O(1) 6   6 O(1) 6  = O (log2 m) · log2 (log2 m) · O(m) = O m · (log2 m) · log2 (log2 m) =

  6 O(1)   6 O(1)  = O O m · (log2 m) · log2 (log2 m) = O m · (log2 m) · log2 (log2 m) ⇒

18 ∆n0 X  6 O(1)  ⇒ t4,i+1(m) = O m · (log2 m) · log2 (log2 m) . i=0

(7) (blg p(k1)c + 1) · (blg p(j)c + 1) 6 (lg p(k1) + 1) · (lg p(j) + 1) <

m 3 (23) < (lg p(j) + 1)2 <> (2 · lg p(j))2 = 4 · lg2 p(j) < 4 · lg2((m + 1)2) =

m 3 = 16 · lg2(m + 1) <> 16 · lg2(m2) = 64 · lg2 m.

4 Therefore, the computing an element D(m ) by multiplying of p(k1)(p(k1) < p(j)) by p(j) is going to take not more than O(lg2 m) steps. Estimate the possible number of actions t4(m) in Step 4 of method №1 for all m > m0.

∆n0 X 2 t4(m) = t4,i+1(m) + O(lg m) = i=0

 6 O(1)  2  6 O(1)  = O m · (log2 m) · log2 (log2 m) + O(lg m) = O m · (log2 m) · log2 (log2 m) ⇒

 6 O(1)  ⇒ t4(m) = O m · (log2 m) · log2 (log2 m) .

4 X 2  6 O(1)  t(m) = ti(m) = O(lg m) + O m · (log2 m) · log2 (log2 m) + i=1

2  6 O(1)   6 O(1)  +O(lg m) + O m · (log2 m) · log2 (log2 m) = O m · (log2 m) · log2 (log2 m) ⇒

 6 O(1)  ⇒ t(m) = O m · (log2 m) · log2 (log2 m) . Proposition 2.14 is proved.

PROPOSITION 2.15. The asymptotic time complexity of finding numbers k1, j after all the steps of method №1 is O(m1+o(1)) at input m. PROOF. Initially, all steps of method №1 are completed. 0 Let t1(m) – number of actions for finding a number k1; 0 t2(m) – number of actions for finding a number j; 0 t3(m) – number of actions over numbers k1, j; 0 t (m) – time complexity of finding numbers k1, j at input m.

 1 +o(1) The asymptotic time complexity of the Lagarias-Odlyzko analytical method is O x 2

(see [5], [6]). Then,

 1   1  0 2 +o(1) 0 2 +o(1) t1(m) = O p(k1) ∧ t2(m) = O p(j) .

19 0  1 +o(1) 0 1) t1(m) = O p(k1) 2 means that there exist constants C1 > 0 and m0 ∈ N : m0 > 3, such that for all m > m0:

1 0 0 2 +o(1) t1(m) 6 C1 · p(k1) .

1 (14) 1 0 2 +o(1) 0 2 2 +o(1) 0 1+2·o(1) 0 1+o(1) C1 · p(k1) < C1 · (m ) = C1 · m = C1 · m , m > m0 ⇒

0 0 1+o(1) 0 1+o(1) ⇒ t1(m) < C1 · m , m > m0 ⇒ t1(m) = O m .

0  1 +o(1) 0 2) t2(m) = O p(j) 2 means that there exist constants C2 > 0 and m0 ∈ N : m0 > 3, such that for all m > m0:

1 0 0 2 +o(1) t2(m) 6 C2 · p(j) .

1 (23) 1 0 2 +o(1) 0 2 2 +o(1) 0 1+2·o(1) 0 1+o(1) C2 · p(j) < C2 · ((m + 1) ) = C2 · (m + 1) = C2 · (m + 1) <

0 1+o(1) 0 1+o(1) 1+o(1) < C2 · (1.34 · m) = C2 · 1.34 · m , m > m0 ⇒

0 0 1+o(1) 1+o(1) 0 1+o(1) 1+o(1) ⇒ t2(m) < C2 · 1.34 · m , m > m0 ⇒ t2(m) = O 1.34 · m ⇒

0 1+O(1) 1+o(1) ⇒ t2(m) = O 1.34 · m .

0 0 The latter means that there exist constants C2 > 0,C3 > 0 and m0 ∈ N : m0 > 3, such that for all m > m0: 0 0 0 1+C3 1+o(1) t2(m) < C2 · 1.34 · m .

0 0 0 1+C3 Introduce a constant C4 ≡ C2 · 1.34 . Then,

0 0 1+o(1) (∀m > m0)(t2(m) < C4 · m ). It follows that 0 1+o(1) t2(m) = O m .

0 3) k1 < j ∧ lg j = lg π(p(j)) < lg p(j) < 4 · lg m ⇒ t3(m) = O(lg m).

3 0 X 0 1+o(1) 1+o(1) 1+o(1) t (m) = ti(m) = O m + O m + O(lg m) = O m ⇒ i=1

⇒ t0(m) = O m1+o(1) .

Proposition 2.15 is proved. COROLLARY 2.16. The asymptotic time complexity of method №1 with the finding

 6 O(1)  numbers k1, j is O m · (log2 m) · log2 (log2 m) .

20 PROOF. With the same notations in proof of Proposition 2.14 and proof of Proposition 2.15,

0 1+o(1) o(1)   6 O(1)  t (m) = O m = O m · m = O m · O (log2 m) · log2 (log2 m) =

  6 O(1)   6 O(1)  = O O m · (log2 m) · log2 (log2 m) = O m · (log2 m) · log2 (log2 m) ⇒

0  6 O(1)  ⇒ t(m) + t (m) = O m · (log2 m) · log2 (log2 m) .

Corollary 2.16 is proved.

CONCLUSION 2.2. Method №1 with the finding numbers k1, j is a polynomial-time method. EXAMPLE 2.1. Find a T -matrix upper defining element D(104) of number 104.

Find numbers k1, j. SOLUTION. Input: m = 10. Step 1. Compute a number n of numbers of the form 6h±1 less than or equal to m2 = 100.

102 + 2 102 %6 102 %6 n ≡ ν(m2) = − + − 1 = 34 − 1 + 0 − 1 = 32. 3 4 5

Step 2. Using the Lenstra-Pomerance primality test,

3 − (−1)32 f(n) = 3 · 32 + = 97 ∈ when i = 0. 2 P

In that case, ∆n = 0. Therefore, p(k1) = f(n − ∆n) = 97. Within T -matrix,

4 2 4 9 < p (k1) = 9409 < 10 .

4 4 Step 3. Compute a number n0 of T -matrix upper element W (m ) of m (in k1-row).

 m4  105 103 % 6 103 % 6 n0 = C = C(103) = − + = 35. p(k1) 3 4 5 Step 4. Using the Lenstra-Pomerance primality test, we find an element D(m4) of T - matrix.

3 − (−1)35 i = 0 : f(n ) = 3 · 35 + = 105 + 2 = 107 ∈ ⇒ ∆n = 0. 0 2 P 0

4 4 4 D(m ) = p(k1) · f(n0 + ∆n0) = 97 · 107 = 10379 < (m + 1) = 11 = 14641.

The obtained prime number p(j) = 107 lies between 102 and 112. Within T -matrix,

104 < p2(j) = 11449 < 114.

21 Output: D(m4) = 10379.

Using the Lagarias-Odlyzko analytical method for prime numbers p(k1) = 97, p(j) = 107,

k1 = π(p(k1)) = 25 ⇒ k1 = 23.

j = π(p(j)) = 28 ⇒ j = 26.

Table 1. Fragment of T -matrix for Example 2.1

Example 2.1 is considered. 2 Now we’ll deal with the question of choice of T -matrix leading element p (k1) on the basis of Step 2 of method №1. Let any number m ∈ N, m > 3 is chosen. From some number k > 1 select all d ∈ N leading elements p2(k + i), i = 0; d − 1 that lie between (m − 1)4 and m4. 4 4 Using Definition 2.3, we find the upper defining elements Dk+i(m ) of number m , and

4 4 Dk+i(m ) < (m + 1) , i = 0; d − 1.

4 4 Since (m − 1) , m ∈/ MT , there are strict inequalities: 4 2 4 4 (m − 1) < p (k + i) < m < Dk+i(m ), i = 0; d − 1.

4 Use Theorem 2.2 for elements Dk+i(m ). As a result, there is a ¾transition down¿ of 4 element Dk+i(m ) from (k + i)-row (i = 0; d − 1) to the appropriate ji-row (some of them may coincide) of T -matrix:

4 2 2 4 k + i < ji ∧ Dk+i(m ) < p (ji) ∧ a(ji;#k+i(p (k + i))) = Dk+i(m ) ∧

4 2 ∧ a(ji;#k+i(Dk+i(m ))) = p (ji), i = 0; d − 1.

In turn, given Conjecture 2.1, there may be the following 3 situations. Situation №1. d = 1. Then there exists only 1 leading element p2(k) between (m − 1)4 4 and m . When the ¾transition down¿ happens from k-row to j0-row, there are inequalities:

4 4 2 4 m < Dk(m ) < p (j0) < (m + 1) .

4 4 4 2 Situation №2. d 6= 1 ∧ m < Dk+i(m ) < (m + 1) < p (ji), i = 0; h, h < d − 1 ∧

4 4 2 4 ∧ m < Dk+i(m ) < p (ji) < (m + 1) , i = h + 1; d − 1.

4 4 4 2 Situation №3. d 6= 1 ∧ m < Dk+i(m ) < (m + 1) < p (ji), i = 0; d − 2 ∧

22 4 4 2 4 ∧ m < Dk+d−1(m ) < p (jd−1) < (m + 1) .

Really, if there is a chain of inequalities

4 4 4 2 m < Dk+i(m ) < (m + 1) < p (ji), i = 0; d − 1, then the result may be that the prime numbers don’t exist between m2 and (m + 1)2. This would mean that the Legendre’s conjecture is false. That’s why Definition 2.1 of T -matrix upper defining element of number was introduced. Hence question of choice of T -matrix 2 leading element p (k1) is solved.

The benefit of choosing this leading element is that k1-row of T -matrix contains all defining 2 elements a(k1; ni) > p (k1), i = 1; qm, n1 < n2 < ... < nqm ; for each of them with appropriate

¾transition¿ to other ji-row of T -matrix one of the chains of inequalities is done: " a(k ; n ) < m4 < p2(j ) < (m + 1)4 1 i i . (24) 4 2 4 m < a(k1; ni) < p (ji) < (m + 1)

Consequently, we will consider the next paragraph.

3. ¾Active¿ set and ¾critical¿ element for numbers (m − 1)4, m4 (m > 3) 2 Let any natural number m > 3 is chosen, and the leading element p (k1) is found on the basis of (14). Assume that Conjecture 2.1 is true. Let us consider an ordered set (D ; ), where Tk1 6 D ≡ {p(k) · p(k ), k 2}. Tk1 1 > Since all elements of (D ; ) are pairwise comparable, (D ; ) is a linearly ordered Tk1 6 Tk1 6 set, and an appropriate relation 6 is a relation of linear order. The following principles are known. THEOREM 3.1 (greatest element principle). Every nonempty finite set of natural numbers has a greatest element. THEOREM 3.2 (least element principle). Every nonempty set of natural numbers has a least element. PROPERTY 3.1. 1) 7 · p(k ) is the least element of set D . 1 Tk1 2) The set D has not the greatest element. Tk1 3) (D ; ) is well-ordered set. Tk1 6 PROOF. 1) D ⊂ ∧ D 6= . By Theorem 3.2, the set D has the least element. Tk1 N Tk1 ∅ Tk1 In turn, (∀x ∈ D )(p(2) · p(k ) x), where p(2) = 7. Tk1 1 6

23 As such, Property 3.1, 1) is true. 2) Introduce a linearly ordered set (P\{2; 3; 5}; 6). By Euclid’s theorem (see [3]), the set P is infinite. So, the set P has not the greatest element. Then the set P\{2; 3; 5} has not the greatest element. It follows that the set D has not the greatest element. Tk1 3) D ⊂ ∧ D 6= . Then every subset of set D is also a subset of set . Then, Tk1 N Tk1 ∅ Tk1 N by Theorem 3.2, every nonempty subset of set D has the least element. That means that Tk1 (D ; ) is well-ordered set. Tk1 6 Property 3.1 is proved. 2 DEFINITION 3.1. A set H 4 4 ⊂ D of all defining elements a(k ; n ) > p (k ) (m−1) , m Tk1 1 i 1 (from k1-row of T -matrix), i = 1; qm , which satisfy (24), is called an ¾active¿ set for numbers 4 4 (m − 1) , m (m > 3). Let

4 4 H(m−1) , m ≡ {a(k1; n1),..., a(k1; nqm )}, where a(k1; n1) < ... < a(k1; nqm ). (25)

4 4 GCD(H(m−1) , m ) ≡ GCD(a(k1; n1),...,a(k1; nqm )). (26)

4 4 4 4 DEFINITION 3.2. A defining element C(m−1) , m ≡ a(k1; nqm+1) ∈/ H(m−1) , m , next

4 4 to a defining element a(k1; nqm ) ∈ H(m−1) , m , is called a ¾critical¿ element for numbers 4 4 (m − 1) , m (m > 3). 2 DEFINITION 3.3. A ¾transition¿ of the defining element a(k1; ni) > p (k1) from k1-row to ji-row (ji > k1) of T -matrix with some i ∈ N is called successful if a(k1; ni) ∈ H(m−1)4, m4 .

Otherwise, that is if a(k1; ni) ∈/ H(m−1)4, m4 , this ¾transition¿ is called unsuccessful.

PROPERTY 3.2. The ¾active¿ set H(m−1)4, m4 is finite. 2 2 PROOF. The number qm of prime numbers between m and (m + 1) is finite. Then 2 number of defining elements which satisfy (24) and greater than the leading element p (k1) is also finite. So, the set H(m−1)4, m4 is finite. Property 3.2 is proved.

Note that by Theorem 3.1 and Theorem 3.2, the set H(m−1)4, m4 has the greatest and least elements. It follows from (25) that

4 4 4 4 min H(m−1) , m = a(k1; n1) ∧ max H(m−1) , m = a(k1; nqm ).

PROPERTY 3.3. 2 min H(m−1)4, m4 = D(p (k1)).

This equality follows from Definition 3.1 and Definition 2.1. PROPOSITION 3.3.

GCD(H(m−1)4, m4 ) = p(k1). (27)

PROOF. Definition 3.1 makes it clear that all elements of set H(m−1)4, m4 are defining and

2 a(k1; ni) > p (k1), i = 1; qm.

24 Then we can use Theorem 2.2 for them. As a result,

(5) 2 (2) 2 a(k1; ni) = a(ji;#k1 (p (k1))) = p(ji) · f(#k1 (p (k1))) =

= p(ji) · p(k1) = p(k1) · p(ji) ⇒ a(k1; ni) = p(k1) · p(ji), i = 1; qm. (28)

(28) p(k1)>0 a(k1; n1) < ... < a(k1; nqm ) ⇔ p(k1) · p(j1) < ... < p(k1) · p(jqm ) ⇔

⇔ p(j1) < ... < p(jqm ) ⇒ GCD(p(j1),...,p(jqm )) = 1 ⇔

⇔ p(k1) · GCD(p(j1),...,p(jqm )) = p(k1).

(28) p(k1) · GCD(p(j1),...,p(jqm )) = GCD(p(k1) · p(j1),...,p(k1) · p(jqm )) =

(26) 4 4 4 4 = GCD(a(k1; n1),...,a(k1; nqm )) = GCD(H(m−1) , m ) ⇒ GCD(H(m−1) , m ) = p(k1). Proposition 3.3 is proved.

PROPOSITION 3.4. If divide all elements of ¾active¿ set H(m−1)4, m4 by GCD(H(m−1)4, m4 ), 2 2 then get all the different prime numbers that lie between m and (m + 1) (m > 3).

PROOF. By Definition 3.1, every element of ¾active¿ set H(m−1)4, m4 satisfies (24). There- fore, for each of them with appropriate ¾transition¿ from k1-row to other ji-row of T -matrix:

4 2 4 2 2 m < p (ji) < (m + 1) , i = 1; qm ⇔ m < p(ji) < (m + 1) , i = 1; qm.

Using the beginning of the proof of Proposition 3.3, we come to presentations (28) of the defining elements a(k1; ni), i = 1; qm. Express the prime numbers p(ji):

a(k1; ni) (27) a(k1; ni) p(ji) = , i = 1; qm ⇔ p(ji) = , i = 1; qm. (29) p(k1) GCD(H(m−1)4, m4 ) (28), p(k1)>0 a(k1; n1) < ... < a(k1; nqm ) ⇔ p(j1) < ... < p(jqm ). (30)

Thus, given (29) and (30), we make sure that Proposition 3.4 is true. Proposition 3.4 is proved. PROPOSITION 3.5. The T -matrix upper defining element D(m4) < (m + 1)4 of number 4 4 4 m (m > 3) belongs to the ¾active¿ set H(m−1)4, m4 for numbers (m − 1) , m . This proposition is true, if Conjecture 2.1 is true. We’ll show it.

 4  2 D(m ) 2 (∀m ∈ N : m > 3) m < < (m + 1) ⇔ p(k1)

 2 4  4 D (m ) 4 ⇔ (∀m ∈ N : m > 3) m < 2 < (m + 1) . p (k1) It follows from Definition 2.1 and Definition 1.1 that

2 4 D (m ) 2 2 = p (j). p (k1)

25 2 4 (14) 2 4 2 4 D (m ) D (m ) D (m ) 4 4 2 2 > 4 > 4 = D(m ) ⇒ D(m ) < p (j). p (k1) m D(m ) Using Theorem 2.6 for defining element D(m4) < p2(j), we make sure that all elements of ¾active¿ set H(m−1)4, m4 will be located in k1-row (k1 < j) of T -matrix. One such element 4 4 is D(m ). Really, when the element D(m ) ¾moves down¿ from k1-row to j-row (j > k1) of T -matrix, there is a chain of inequalities: m4 < D(m4) < p2(j) < (m + 1)4. (31)

4 2 Therefore, condition (24) holds in relation to the element D(m ) > p (k1). By Definition 4 3.1, that means that D(m ) ∈ H(m−1)4, m4 . 4 Thus, by Definition 3.3, the ¾transition down¿ of element D(m ) from k1-row to j-row

(j > k1) of T -matrix will be successful. COROLLARY 3.6. The T -matrix upper defining element D(m4) < (m + 1)4 of number 4 4 4 m (m > 3) is not ¾critical¿ for numbers (m − 1) , m .

PROPOSITION 3.7. The ¾transition¿ of ¾critical¿ element C(m−1)4, m4 for numbers 4 4 (m − 1) , m (m > 3) from k1-row to jqm+1-row (jqm+1 > k1) of T -matrix is unsuccessful. This proposition follows from Definition 3.2 and Definition 3.3.

PROPOSITION 3.8. The defining elements a(k1; ni), i = 1; sm, sm < qm, lying between 2 4 the leading element p (k1) and the T -matrix upper defining element D(m ) ≡ a(k1; nsm+1) 4 4 4 4 (a(k1; nsm+1) < (m + 1) ) of number m (m > 3), are elements of ¾active¿ set H(m−1) , m . 0 PROOF. Let H(m−1)4, m4 is a set of all defining elements a(k1; ni) such that

2 4 p (k1) < a(k1; ni) < D(m ), i = 1; sm, sm < qm.

0 Using Theorem 2.2 for each element of set H(m−1)4, m4 , we get

2 2 k1 < ji ∧ a(k1; ni) < p (ji) ∧ a(ji;#k1 (p (k1))) = a(k1; ni) ∧

2 ∧ a(ji; ni) = p (ji), i = 1; sm.

As opposed to the element D(m4) for each of them:

4 a(k1; ni) < m , i = 1; sm.

4 2 4 Now we need to show that inequalities m < p (ji) < (m + 1) , i = 1; sm; are true. Assume the converse. Then consider 2 cases. 2 4 Case 1. p (jr) < m with some r ∈ N : 1 6 r 6 sm. Within T -matrix,

2 2 p(k1) = max p(k) ⇔ p (k1) = max p (k). (32) (m−1)21 k>1

2 2 It follows from Property 1.1 and inequality k1 < jr that p (k1) < p (jr). Then,

26 4 2 2 4 (m − 1) < p (k1) < p (jr) < m .

2 As a result, a contradiction to the maximality of the leading element p (k1) from (32). 4 2 Case 2. (m + 1) < p (jr) with some r ∈ N : 1 6 r 6 sm. The T -matrix upper defining element D(m4) of number m4 satisfies inequalities (31). Then, 4 4 2 4 2 2 2 m < D(m ) < p (j) < (m + 1) < p (jr) ⇒ p (j) < p (jr).

From condition of Proposition 3.8,

2 4 p (k1) < a(k1; nr) < D(m ).

4 Then it follows from Theorem 2.2 for defining elements a(k1; nr) and D(m ) that jr < j. 2 2 So, by Property 1.1, p (jr) < p (j). As a result, a contradiction. Thus, 4 2 4 a(k1; ni) < m < p (ji) < (m + 1) , i = 1; sm.

Therefore, condition (24) holds in relation to every element a(k1; ni)(i = 1; sm). By Definition 3.1, that means that

a(k1; ni) ∈ H(m−1)4, m4 , i = 1; sm.

Eventually, 0 H(m−1)4, m4 ⊂ H(m−1)4, m4 . Proposition 3.8 is proved.

EXAMPLE 3.1. Construct an ¾active¿ set H54, 64 , find a ¾critical¿ element C54, 64 for numbers 54, 64. SOLUTION. It follows from condition of Example 3.1 that m = 6. Then,

(m − 1)4 = 54 = 625, m4 = 64 = 1296, (m + 1)4 = 74 = 2401.

Using method №1 with the finding a number k1 or the presentation of T -matrix, we compute: 2 1) T -matrix leading element p (k1) satisfying (32):

2 p(k1) = 31 ⇔ p (k1) = 961.

2) number of k1-row of T -matrix:

k1 = 9. 3) T -matrix upper defining element D(m4) < (m + 1)4 of number m4: D(m4) = 1333.

27 4 4 First, we construct an ¾active¿ set H(m−1)4, m4 for numbers (m − 1) , m . 1) By Proposition 3.5, 4 D(m ) = 1333 ∈ H(m−1)4, m4 .

2) By Proposition 3.8, the defining elements a(k1; n1) = 1147, a(k1; n2) = 1271, lying 2 4 between the leading element p (k1) and the element D(m ), are elements of set H(m−1)4, m4 . In this case, let

4 a(k1; n3) ≡ D(m ).

3) The defining element a(k1; n4) = 1457 immediately follows after the defining element a(k1; n3) = 1333 in k1-row of T -matrix. It follows from Definition 1.1 and Theorem 2.2 that

a(k1; ni) p(ji) = , i = 1; qm + 1. (33) p(k1)

(33) 1457 p(j ) = = 47 < (m + 1)2 = 72 = 49. 4 31

As a result, condition (24) holds for element a(k1; n4). So, by Definition 3.1,

a(k1; n4) ∈ H(m−1)4, m4 .

4) The not defining element 1519 immediately follows after the defining element a(k1; n4) in k1-row of T -matrix.

5) The defining element a(k1; n5) = 1643 immediately follows after the not defining ele- ment 1519 in k1-row of T -matrix.

(33) a(k1; n5) 1643 2 p(j5) = = = 53 > (m + 1) . p(k1) 31

As a result, condition (24) does not hold for element a(k1; n5). So, by Definition 3.1,

a(k1; n5) ∈/ H(m−1)4, m4 .

a(k1; n5) is the next defining element after the defining element a(k1; n4) ∈ H(m−1)4, m4 . Then, by Definition 3.2,

C(m−1)4, m4 = a(k1; n5).

Eventually,

H(m−1)4, m4 = {1147; 1271; 1333; 1457} (sm = 2, qm = 4),

C(m−1)4, m4 = 1643.

Example 3.1 is considered. Next, we’ll show the illustration of Example 3.1.

28 Table 2. Illustration of Example 3.1. 4 4 4 4 ¾Active¿ set H54, 64 for numbers 5 , 6 ; ¾critical¿ element C54, 64 for numbers 5 , 6 .

Now, let’s look at an important example, when the T -matrix lower defining element d(m4) 4 2 of number m coincides with the leading element p (k1).

EXAMPLE 3.2. Construct an ¾active¿ set H44, 54 , find a ¾critical¿ element C44, 54 for numbers 44, 54. SOLUTION. It follows from condition of Example 3.2 that m = 5. Then,

(m − 1)4 = 44 = 256, m4 = 54 = 625, (m + 1)4 = 64 = 1296.

Using method №1 with the finding a number k1 or the presentation of T -matrix, we compute: 2 1) T -matrix leading element p (k1) satisfying (32):

2 p(k1) = 23 ⇔ p (k1) = 529.

2) number of k1-row of T -matrix:

k1 = 7. 3) T -matrix upper defining element D(m4) < (m + 1)4 of number m4:

D(m4) = 667.

4 4 First, we construct an ¾active¿ set H(m−1)4, m4 for numbers (m − 1) , m . 1) By Proposition 3.5, 4 D(m ) = 667 ∈ H(m−1)4, m4 .

2 2) As Table 3 shows, the defining elements don’t exist between the leading element p (k1) 4 and the element D(m ) in k1-row of T -matrix, there exists only the not defining element 575. 4 2 Therefore, by Definition 2.2, d(m ) = p (k1). As such, let

4 a(k1; n1) ≡ D(m ).

29 3) The defining element a(k1; n2) = 713 immediately follows after the defining element a(k1; n1) = 667 in k1-row of T -matrix.

(33) a(k1; n2) 713 2 2 p(j2) = = = 31 < (m + 1) = 6 = 36. p(k1) 23

As a result, condition (24) holds for element a(k1; n2). So, by Definition 3.1,

a(k1; n2) ∈ H(m−1)4, m4 .

4) The not defining element 805 immediately follows after the defining element a(k1; n2) in k1-row of T -matrix.

5) The defining element a(k1; n3) = 851 immediately follows after the not defining element

805 in k1-row of T -matrix.

(33) a(k1; n3) 851 2 p(j3) = = = 37 > (m + 1) . p(k1) 23

As a result, condition (24) does not hold for element a(k1; n3). So, by Definition 3.1,

a(k1; n3) ∈/ H(m−1)4, m4 .

a(k1; n3) is the next defining element after the defining element a(k1; n2) ∈ H(m−1)4, m4 . Then, by Definition 3.2,

C(m−1)4, m4 = a(k1; n3).

Eventually,

H(m−1)4, m4 = {667; 713} (sm = 0, qm = 2),C(m−1)4, m4 = 851.

Example 3.2 is considered. Next, we’ll show the illustration of Example 3.2.

Table 3. Illustration of Example 3.2. 4 4 4 4 ¾Active¿ set H44, 54 for numbers 4 , 5 ; ¾critical¿ element C44, 54 for numbers 4 , 5 .

30 4 2 Note that the equality d(m ) = p (k1) does not affect the existence of prime number 2 2 2 4 between m and (m + 1) , since in this case D(p (k1)) = D(m ) ∈ H(m−1)4, m4 . THEOREM 3.9. √  2 2 4 4  (∀x ∈ R) x > 3 ⇒ π((x + 1) ) − π(x ) = πMT ((x + 1) ) − πMT (x ) (see [1]).

THEOREM 3.10 (about cardinality of ¾active¿ set H(m−1)4, m4 ).

4 4  4 4 (∀m > 3) H(m−1) , m = πMT ((m + 1) ) − πMT (m ) . PROOF. The cases m = 1 and m = 2 are not considered, since

m ∈ {1; 2} ⇒ (m − 1)4 < m4 < p2(1) = 25.

It follows from Proposition 3.4 that

2 2 H(m−1)4, m4 = qm = π((m + 1) ) − π(m ).

It follows from Theorem 3.9 that

2 2 4 4  (∀m ∈ N) m > 3 ⇒ π((m + 1) ) − π(m ) = πMT ((m + 1) ) − πMT (m ) . Theorem 3.10 is proved. 4 4 2 4 PROPOSITION 3.11. 1) D(m ) < (m + 1) ⇒ D(p (k1)) 6 D(m ). 2 4 4 2) The element D(p (k1)) is not ¾critical¿ for numbers (m − 1) , m (m > 3). PROOF. It follows from Definition 2.1 and (32) that

2 2 2 4 4 p (k1) < D(p (k1)) ∧ p (k1) < m < D(m ).

2 Case 1. There exists the defining element, lying between the leading element p (k1) and 4 the number m in k1-row of T -matrix. In this case, 2 2 4 4 2 4 p (k1) < D(p (k1)) < m < D(m ) ⇒ D(p (k1)) < D(m ). By Proposition 3.8, 2 2 4 4 2 p (k1) < D(p (k1)) < D(m ) < (m + 1) ⇒ D(p (k1)) ∈ H(m−1)4, m4 .

2 4 4 By Definition 3.2, that means that the element D(p (k1)) is not ¾critical¿ for (m−1) , m . Case 2. There doesn’t exist the defining elements, lying between the leading element 2 4 2 4 p (k1) and m in k1-row of T -matrix. In this case, D(p (k1)) = D(m ). From Corollary 3.6 2 2 4 we get that the element D(p (k1)) (D(p (k1)) < (m + 1) ) is not ¾critical¿ for numbers (m − 1)4, m4. Proposition 3.11 is proved. PROPOSITION 3.12. For m > 3, if Legendre’s conjecture is true, then D(p2(k )) min p = 1 . m2

31 PROOF. Use Property 3.3.

2 2 D(p (k1)) min H(m−1)4, m4 D(p (k1)) = min H(m−1)4, m4 ⇔ = . p(k1) p(k1)

min H(m−1)4, m4 (25) a(k1; n1) (28) (30) = = p(j1) = min p. p(k1) p(k1) m2 3, if Legendre’s conjecture is true, then

min H 4 4 min p = (m−1) , m . m2 2, Legendre’s conjecture is true ⇔

4 4 (∃q ∈ MT )(q ∈ (m ;(m + 1) )) .

CONCLUSION 4.2. For m > 3, Legendre’s conjecture is true ⇔ H(m−1)4, m4 6= ∅. 2 ¾WEAK¿ CONJECTURE 4.1. D(p (k1)) ∈ H(m−1)4, m4 . 4 ¾STRONG¿ CONJECTURE 4.2. D(m ) ∈ H(m−1)4, m4 . CONCLUSION 4.3. 1) Conjecture 2.1 is true ⇔ ¾Strong¿ Conjecture 4.2 is true. 2) For m > 3, Legendre’s conjecture is true ⇔ ¾Weak¿ Conjecture 4.1 is true. 2 3) For m 3, ¾Weak¿ Conjecture 4.1 is true ⇔ m2 < D(p (k1)) < (m + 1)2. > p(k1) 4) For m > 3, ¾Strong¿ Conjecture 4.2 is true ⇒ Legendre’s conjecture is true. 5) ¾Strong¿ Conjecture 4.2 is true ⇒ ¾Weak¿ Conjecture 4.1 is true (this follows from Conclusion 4.3, 2) and Conclusion 4.3, 4)). CONCLUSION 4.4. Only one of three outcomes of conjectures is true.

Outcome №1. Legendre’s conjecture is true. H(m−1)4, m4 6= ∅.There exists the defining 2 4 element, lying between the leading element p (k1) and the number m in k1-row of T -matrix. 4 The ¾transition¿ of element D(m ) from k1-row to j-row (j > k1) of T -matrix is unsuccessful, 2 the ¾transition¿ of element D(p (k1)) from k1-row to j1-row (j > j1 > k1) of T -matrix is successful (¾Strong¿ Conjecture 4.2 is false).

Outcome №2. Legendre’s conjecture is false. H(m−1)4, m4 = ∅. There doesn’t exist the 2 4 defining elements, lying between the leading element p (k1) and m in k1-row of T -matrix. 4 4 2 The ¾transition¿ of element D(m ), where D(m ) = D(p (k1)), from k1-row to j-row (j > k1) of T -matrix is unsuccessful (¾Strong¿ Conjecture 4.2 is false).

Outcome №3. Legendre’s conjecture is true. H(m−1)4, m4 6= ∅.The ¾transition¿ of element 4 D(m ) from k1-row to j-row (j > k1) of T -matrix is successful, the ¾transition¿ of element 2 D(p (k1)) from k1-row to j1-row (j > j1 > k1) of T -matrix is successful (¾Strong¿ Conjecture 4.2 is true).

32 5. Conclusion Theorem of presentation and basic definitions for T -matrix elements are formulated. New types of T -matrix elements, the most important of which is T -matrix upper defining element D(b) of some real number b > 49, are introduced. Theorems and consequences from them related to the ¾transition¿ of defining elements, in particular, of element D(b), from one row of T -matrix to another are proved. Way to go from the leading elements p2(k) and p2(k+1) to 2 element Dk(p (k)) (k > 1) is shown. Relation between the functions νk and ν is established. Formula for calculating the values of ν(m) for all m ∈ N is got. 4 4 Method to compute the T -matrix upper defining element D(m ) of number m (m > 3) with the finding numbers k1, j is developed. Asymptotic time complexity of this method is found. It has been shown that this method has polynomial running time. The problem of finding a prime number p(j) between m2 and (m + 1)2 is considered. 4 2 Conjectures about the ratios D(m ) and D(p (k1)) , lying between m2 and (m + 1)2 (m 3), p(k1) p(k1) > 4 are proposed. The indivisibility of number m (m > 3) by prime number p(k1) is proved. Properties of sets D , H 4 4 are explored. Propositions about ¾active¿ set and Tk1 (m−1) , m ¾critical¿ element for numbers (m − 1)4 and m4 are proved, assuming that Conjecture 2.1 is true. The theorem about cardinality of ¾active¿ set H(m−1)4, m4 is proved. Important in

finding elements of ¾active¿ set H(m−1)4, m4 is the inequality

2 4 4 4 D(p (k1)) 6 D(m ), where D(m ) < (m + 1) .

2 2 Two formulas for calculating the minimal prime number between m and (m+1) (m > 3) are found, assuming that Legendre’s conjecture is true. ¾Weak¿ conjecture, ¾Strong¿ conjecture and their equivalent forms are got. Outcomes of these conjectures are described in connection with Legendre’s conjecture.

References

1. Garipov I. About one matrix of composite numbers and her applications //arXiv preprint arXiv:2012.15745. – 2020.

2. Семенов И. Л. Антье и мантисса. Сборник задач с решениями / Под ред. Е. В. Хорошиловой. М.: ИПМ им. М. В. Келдыша, 2015. – 432 с.

3. Бухштаб А.А. Теория чисел, М., Просвещение, 1966.

4. H. W. Lenstra jr., C. Pomerance, ”Primality testing with Gaussian periods”, ver. of April 12, 2011.

5. Р. Крэндалл, К.Померанс. Простые числа: Криптографические и вычислительные аспекты. М.: УРСС, 2011.

33 6. J. C. Lagarias, A. M. Odlyzko, Computing π(x): an analytic method, Journal of Algo- rithms 8, 1987, no. 2, 173-191.

7. В. И. Зенкин. Распределение простых чисел. Элементарные методы, 2012. – 112 c.

34