The Distribution Of Prime Numbers
And The Continued Fractions
Mohammed Bouras
[email protected]
Abstract. In this paper, we present a new sequence containing only ones and the prime numbers, which
can be calculated in two different ways, the first way using the greatest common divisor (gcd) and
Kurepa left factorial function, the second way consisting of using the denominator of the continued
fraction defined by
𝑚𝑏(𝑛 − 3) − 𝑛𝑏(𝑛 − 4) 1
=
𝑛(𝑚 − 𝑛 + 2) − 𝑚 3
2− 4
3−
5
4− ⋱
𝑛
(𝑛 − 1) −
𝑚
Our sequence defined by
|𝑛(𝑚 − 𝑛 + 2) − 𝑚|
𝑎𝑚 (𝑛) =
𝑔𝑐𝑑(𝑛(𝑚 − 𝑛 + 2) − 𝑚, 𝑚𝑏(𝑛 − 3) − 𝑛𝑏(𝑛 − 4))
Where |𝑥| denotes the absolute value of 𝑥.
Keywords. Prime numbers, continued fraction, left factorial, sequence.
1. Introduction and preliminaries
A continued fraction is an expression of the form
𝑏0
𝑎0 +
𝑏1
𝑎1 +
𝑏2
𝑎2 +
⋱
Other notation
𝑏0 𝑏1 𝑏2
𝑎0 + ⋯
𝑎1 + 𝑎2 + 𝑎3 +
Where 𝑎𝑖 and 𝑏𝑖 are either rational numbers, real numbers or complex numbers. For more details see
[𝟑].
1
In 1971, Kurepa introduced the left factorial function, with the symbol ! 𝑛. For more details and formulas
see [4], the Kurepa function is defined by
𝑛−1
𝐾(0) = 0 , 𝐾(𝑛) = ! 𝑛 = ∑ 𝑖! , 𝑛∈ℕ
𝑖=1
In this paper, We establish a connection between the left factorial function of Kurepa 𝐾(𝑛) and the
continued fraction in the theorem (1.3). We define the recursive formula
𝑏(𝑛) = (𝑛 + 2)(𝑏(𝑛 − 1) − 𝑏(𝑛 − 2))
Such that
2𝑏(𝑛 − 1)
𝐾(𝑛) = ! 𝑛 =
𝑛+1
With the initial conditions 𝑏(−1) = 0 and 𝑏(0) = 1. A few values of 𝑏(𝑛)
0, 1, 3, 8, 25, 102, 539,3496, 26613, 231170, 2250127, 24227484, …(see A051403)
Similarly, we define the second recursive formula
𝑐(𝑛) = (𝑛 + 2)(𝑐(𝑛 − 1) − 𝑐(𝑛 − 2))
With the initial conditions 𝑐(1) = 1 and 𝑐(2) = 4. A few values of 𝑐(𝑛)
1, 4, 15, 66, 357, 2328, 17739, 154110, 1500081, 16151652, 190470423,…
The objective of this paper is to construct a new sequence for the distribution of prime numbers which
takes only ones and primes in order. The distribution of prime numbers has been analyzed for a formula
helpful in generating the prime numbers or testing if the given numbers is prime. In this paper, we
present some known formulas.
𝑛
Mills showed that there exists a real number 𝐴 > 1 such that 𝑓(𝑛) = [ 𝐴3 ] is a prime number for any
integers n, approximately A=1.306377883863,.. (see A051021). The first few values
𝑓(𝑛) = {2, 11, 1361, 2521008887, 16022236204009818131831320183,..}, (see A051254)
Euler’s quadratic polynomial 𝑛2 + 𝑛 + 41 is prime for all n between 0 and 39, however, it is not prime
for all integers.
In 2008, Rowland introduce an explicit sequence that contain only ones and primes, the sequence
defined by the recurrence relation
𝑟(𝑛) = 𝑟(𝑛 − 1) + gcd( 𝑛 , 𝑟(𝑛 − 1)); 𝑟(1) = 7
The sequence of differences 𝑟(𝑛 + 1) − 𝑟(𝑛)
1, 1, 1, 5, 3, 1, 1, 1, 1, 11, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 23, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1,1, 1, 1, 47, 3, 1, 5, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 101, 3, 1, 1, 7, 1, 1, 1, 1, 11, 3, 1, 1, 1, 1, 1, 13, 1, 1, 1, 1,
1, 1, 1, 1, 1,.. (see A132199).
For more details and formulas see [1] and [2]. In this paper, we present an interesting sequence which
plays the same role as Rowland's sequence composed of a prime number or 1. Moreover, our sequence
gives all distinct prime numbers in order.
In this section, we give an explicit formula for the continued fraction in the following theorem
2
Theorem 1.1. For all integers 𝑛 ≥ 3. The continued fraction
𝑚𝑏(𝑛 − 3) − 𝑛𝑏(𝑛 − 4) 1
= (1)
𝑛(𝑚 − 𝑛 + 2) − 𝑚 3
2− 4
3− 5
4− ⋱
𝑛
(𝑛 − 1) −
𝑚
Where 𝑚 is a polynomial in term n.
Proof. Let
𝑎1 = 2𝑎2 − 3𝑎3 ; 𝑎2 = 3𝑎3 − 4𝑎4 ; 𝑎3 = 4𝑎4 − 5𝑎5 ; 𝑎4 = 5𝑎5 − 6𝑎6
Then we have
𝑎2 𝑎2 1 1 1
= = = =
𝑎1 2𝑎2 − 3𝑎3 2𝑎2 − 3𝑎3 2 − 3𝑎3 2 − 3
𝑎2 𝑎2 3𝑎3 − 4𝑎4
𝑎3
1 1 1
= = =
3 3 3
2− 4𝑎 2− 4 2− 4
3− 𝑎4 3− 3−
3 4𝑎4 − 5𝑎5 5𝑎
4− 5
𝑎4 𝑎4
After some simplification, we find
𝑎2 1
= (2)
𝑎1 2 − 3
4
3− 5
4− ⋱
𝑛𝑎𝑛
(𝑛 − 1) −
𝑎𝑛−1
From (1) and (2), we have
𝑚𝑎𝑛 = 𝑎𝑛−1 (3)
We write 𝑎1 in terms of 𝑎𝑛−1 and 𝑎𝑛
𝑎1 = 2𝑎2 − 3𝑎3 = ⋯ = (𝑛 − 1)𝑎𝑛−1 − (𝑛2 − 2)𝑎𝑛 (4)
Substtiting (3) in (4), we find
𝑎1 = (𝑛(𝑚 − 𝑛 + 2) − 𝑚)𝑎𝑛
Using the same procedure for 𝑎2 , we have
𝑎2 = 3𝑎3 − 4𝑎4 = 8𝑎4 − 15𝑎5 = 25𝑎5 − 48𝑎6 = ⋯
We observe that
𝑎2 = 𝑏(𝑛 − 3)𝑎𝑛−1 − 𝑛𝑏(𝑛 − 4)𝑎𝑛 (5)
Substtiting (3) in (5), we get
𝑎2 = (𝑚𝑏(𝑛 − 3) − 𝑛𝑏(𝑛 − 4))𝑎𝑛
3
Returning to (2), we obtain
𝑎2 𝑚𝑏(𝑛 − 3) − 𝑛𝑏(𝑛 − 4) 1
= = (6)
𝑎1 𝑛(𝑚 − 𝑛 + 2) − 𝑚 3
2− 4
3− 5
4− ⋱
𝑛
(𝑛 − 1) −
𝑚
This complete the proof.
Theorem 1.2. For all integers 𝑛 ≥ 3. The denominator of the continued fraction is as follows
𝑛(𝑚 − 𝑛 + 2) − 𝑚 = 2(𝑚𝑏(𝑛 − 3) − 𝑛𝑏(𝑛 − 4)) − 3(𝑚𝑐(𝑛 − 3) − 𝑛𝑐(𝑛 − 4))
Where 𝑚 is a polynomial in term n.
Proof. Similarly, using the same procedure as that of proving the theorem 1.
We have
𝑎3 = 4𝑎4 − 5𝑎5 = 15𝑎5 − 24𝑎6 = 66𝑎6 − 105𝑎7 = ⋯
We observe that
𝑎3 = 𝑐(𝑛 − 3). 𝑎𝑛−1 − 𝑛𝑐(𝑛 − 4). 𝑎𝑛 (7)
Substtiting (3) in (7), we find
𝑎3 = (𝑚𝑐(𝑛 − 3) − 𝑛𝑐(𝑛 − 4))𝑎𝑛
Then, we have
𝑎1 = 2𝑎2 − 3𝑎3
(𝑛(𝑚 − 𝑛 + 2) − 𝑚)𝑎𝑛 = [2(𝑚𝑏(𝑛 − 3) − 𝑛𝑏(𝑛 − 4)) − 3(𝑚𝑐(𝑛 − 3) − 𝑛𝑐(𝑛 − 4))]. 𝑎𝑛
Then, we get
𝑛(𝑚 − 𝑛 + 2) − 𝑚 = 2(𝑚𝑏(𝑛 − 3) − 𝑛𝑏(𝑛 − 4)) − 3(𝑚𝑐(𝑛 − 3) − 𝑛𝑐(𝑛 − 4))
This complete the proof.
Theorem 1.3. For all integers 𝑛 ≥ 3. The continued fraction
2. (𝑚𝑏(𝑛 − 3) − 𝑛𝑏(𝑛 − 4)) 1
= (8)
𝑛(𝑚 − 𝑛 + 1) 1
1− 2
2− 3
3− ⋱
𝑛−1
(𝑛 − 1) −
𝑚
Where 𝑚 is a polynomial in term n.
Proof. Similarly, Using the same procedure of proof the theorem (1.1)
Putting
4
𝑎1 = 𝑎2 − 𝑎3 ; 𝑎2 = 2𝑎3 − 2𝑎4 ; 𝑎3 = 3𝑎4 − 3𝑎5 ; 𝑎4 = 4𝑎5 − 4𝑎6 ;…
And we obtain the desired result.
Remark 1
For 𝑚 = 𝑛, the Kerupa left factorial function is as continued fraction
1
𝐾(𝑛) = ! 𝑛 =
1
1− 2
2− 3
3− ⋱
𝑛−1
(𝑛 − 1) −
𝑛
The more interesting sequence follows
2. The sequence 𝒂𝒎 (𝒏)
The sequence of the unreduced denominator of the continued fraction (theorem 1.1) is as follows
|𝑛(𝑚 − 𝑛 + 2) − 𝑚|
𝑎𝑚 (𝑛) =
𝑔𝑐𝑑(𝑛(𝑚 − 𝑛 + 2) − 𝑚, 𝑚𝑏(𝑛 − 3) − 𝑛𝑏(𝑛 − 4))
Where gcd(x, y) denotes the greatest common divisor of x and y.
3. Main results
In this section we present some new results for our sequence in the following conjectures
Conjecture 3.1. For all integers 𝑛 ≥ 2 and 𝑚 = 𝑛 + 1. The sequence of the unreduced denominator is
as follows
2𝑛 − 1
𝑎(𝑛) =
𝑔𝑐𝑑(2𝑛 − 1, 𝑏(𝑛 − 2) + 𝑏(𝑛 − 3))
The values of 𝑎(𝑛)
3, 5, 7, 3, 11, 13, 1, 17, 19, 1, 23, 1, 1, 29, 31, 1, 1, 37, 1, 41, 43, 1, 47, 1, 1, 53, 1, 1, 59, 61, 1, 1, 67,
1, 71, 73, 1, 1, 79, 1, 83, 1, 1, 89, 1, 1, 1, 97, 1, 101, 103, 1, 107, 109, 1, 113, 1, 1, 1, 1, 1, 1, 127, 1, 131,
1, 1, 137, 139, 1, 1, 1, 1, 149, 151, 1, 1, 157, 1, 1, 163, 1, 167,…
The sequence 𝑎(𝑛) takes only 1’s and primes in order (except for the prime 𝑎(5) = 3). We have verified
this conjecture to 𝑛 = 10000 by using the denominator of the continued fraction in the theorem (1.1)
for 𝑚 = 𝑛 + 1. The checking was facilitated by the following observation: except for n=5, 𝑎(𝑛) =
2𝑛 − 1 if 2𝑛 − 1 is prime, 1 otherwise.
Conjecture 3.2. For all integers 𝑛 ≥ 2 and 𝑚 = 𝑛 − 3. The sequence of the unreduced denominator is
as follows
2𝑛 − 3
𝑎(𝑛) =
𝑔𝑐𝑑(2𝑛 − 3, 3𝑏(𝑛 − 3) − 𝑏(𝑛 − 2))
The values of 𝑎(𝑛)
5
1, 1, 5, 7, 1, 11, 13, 1, 17, 19, 1, 23, 1, 1, 29, 31, 1, 1, 37, 1, 41, 43, 1, 47, 1, 1, 53, 1, 1, 59, 61, 1, 1,
67, 1, 71, 73, 1, 1, 79, 1, 83, 1, 1, 89, 1, 1, 1, 97, 1, 101, 103, 1, 107, 109, 1, 113, 1, 1, 1, 1, 1, 1, 127, 1,
131, 1, 1, 137, 139, 1, 1, 1, 1, 149, 151, 1, 1, 157, 1, 1, 163, 1, 167,…
We conjecture that :
∗ Every term of this sequence is either a prime number or 1.
∗ Except for the primes 2 and 3, the primes all appear in this sequence in order.
On the other hand the conjecture verified for 𝑛 ≤ 10000. The checking was facilitated by the following
observation: for 𝑛 ≥ 4, 𝑎(𝑛) = 2𝑛 − 3 if 2𝑛 − 3 is prime, 1 otherwise .
Conjecture 3.3. For all integers 𝑛 ≥ 3 and 𝑚 = −1. The sequence of the unreduced denominator is
as follows
𝑛2 − 𝑛 − 1
𝑎(𝑛) =
𝑔𝑐𝑑(𝑛2 − 𝑛 − 1, 𝑏(𝑛 − 3) + 𝑛𝑏(𝑛 − 4))
The values of 𝑎(𝑛) 𝑓𝑜𝑟 𝑛 ≥ 2
1, 5, 11, 19, 29, 41, 11, 71, 89, 109, 131, 31, 181, 19, 239, 271, 61, 31, 379, 419, 461, 101, 29, 599, 59,
701, 151, 811, 79, 929, 991, 211, 59, 41, 1259, 1, 281, 1481, 1559, 149, 1721, 1, 61, 1979, 2069, 2161,
1, 2351, 79, 2549, 241, 1, 2861, 2969, 3079, 3191,…(see A356247)
We conjecture that :
∗ Every term of this sequence is either a prime number or 1.
∗ Except for 5, the primes terms all appear exactly twice, such that
𝑎(𝑛) = 𝑎(𝑎(𝑛) − 𝑛 + 1)
Consequently, let us consider the values of n and m such that we get:
𝑎(𝑛) = 𝑎(𝑚) = 𝑛 + 𝑚 − 1
And
𝑎(𝑛) = 𝑎(𝑚) = gcd(𝑛2 − 𝑛 − 1, 𝑚2 − 𝑚 − 1)
We have verified this conjecture to 𝑛 = 10001 (Bill Mceachen and Michael De Vlieger verification)
by using the denominator of the continued fraction in the theorem (1.1) for 𝑚 = −1.
Conjecture 3.4. For all integers 𝑛 ≥ 3 and 𝑚 = −2. The expression of the sequence 𝑎(𝑛) is as follows
𝑛2 − 2
𝑎(𝑛) =
𝑔𝑐𝑑(𝑛2 − 2, 2𝑏(𝑛 − 3) + 𝑛𝑏(𝑛 − 4))
The values of 𝑎(𝑛).
7, 7, 23, 17, 47, 31, 79, 7, 17, 71, 167, 97, 223, 127, 41, 23, 359, 199, 439, 241, 31, 41, 89, 337, 727, 1,
839, 449, 137, 73, 1087, 577, 1223, 647, 1367, 103, 1, 47, 73, 881, 1, 967, 1, 151, 2207, 1151, 2399,
1249, 113, 193, 401, 1, 3023, 1567, 191, 41, 71…
The sequence 𝑎(𝑛) takes only 1’s and primes.
6
Conjecture 3.5. For all integers 𝑛 ≥ 3 and 𝑚 = 𝑛 + 2. The expression of the sequence 𝑎(𝑛) is as
follows
3𝑛 − 2
𝑎(𝑛) =
𝑔𝑐𝑑(3𝑛 − 2, (𝑛 + 1)𝑏(𝑛 − 3) − 𝑏(𝑛 − 4) − (𝑛 − 1)𝑏(𝑛 − 5))
The values of 𝑎(𝑛)
7 , 5, 13, 2, 19, 11, 5, 1, 31, 17, 37, 1, 43, 23, 1, 1, 1, 29, 61, 1, 67, 1, 73, 1, 79, 41, 1, 1, 1, 47, 97, 1,
103, 53, 109, 1, 1, 59, 1, 1, 127, 1, 1, 1, 139, 71, 1, 1, 151, 1, 157, 1, 163, 83, 1, 1, 1, 89, 181, 1, 1, 1,
193, 1, 199, 101, 1, 1, 211,…
The sequence 𝑎(𝑛) contain only ones and the primes.
Conjecture 3.6. For all integers 𝑛 ≥ 3 and 𝑚 = 𝑛 + 3. The expression of the sequence 𝑎(𝑛) is as
follows
4𝑛 − 3
𝑎(𝑛) =
𝑔𝑐𝑑(4𝑛 − 3, (𝑛 + 2)𝑏(𝑛 − 3) − 𝑏(𝑛 − 4) − (𝑛 − 1)𝑏(𝑛 − 5))
The values of 𝑎(𝑛)
3, 13, 17, 7, 5, 29, 11, 37, 41, 1, 7, 53, 19, 61, 1, 23, 73, 1, 1, 1, 89, 31, 97, 101, 1, 109, 113, 1, 1, 1, 43,
1, 137, 47, 1, 149, 1, 157, 1, 1, 1, 173, 59, 181, 1, 1, 193, 197, 67, 1, 1, 71, 1, 1, 1, 229, 233, 79, 241, 1,
83, 1, 257, 1, 1, 269, 1, 277,…
The sequence 𝑎(𝑛) takes only 1’s and primes.
Remark 2
Obviously many more such conjectures can be formulated.
Acknowldgements
I would like to thank Bill Mceachen for the numerous comments and suggestions. Thanks go also to
Jon. E. Schoenfield, Alois. P. Heinz, Michael De Vlieger and the other editor-in-chief of the on-line
encyclopedia of integer sequences (Oeis).
References
[1] Eric S. Rowland, A Natural Prime-Generating Recurrence, Journal of Integer Sequences, Vol. 11
(2008).
[2] Benoit Cloitre, 10 conjectures in additive number theory, https://arxiv.org/abs/1101.4274
[3] David Angell, A family of continued fractions, Journal of Number Theory 130 (2010) 904–911.
[4] Bernd C. Kellner, Some remarks on Kurepa’s left factorial, arXiv:math/0410477v1 [math.NT] 21
Oct 2004.
[5] N. J. A. Sloane, The On-line Encyclopedia of integer sequences, https://oeis.org
[6] Plouffe Simon, A set of formulas for primes, https://vixra.org/abs/1812.0494