On continued fractions of the square root of prime numbers

Alexandra Ioana Gliga

March 17, 2006

Nota Bene: Conjecture 5.2 of the numerical results at the end of this paper was not correctly derived from the Mathematica code written for this investigation. Thus, if you wish to check the validity of the numerical conjectures please run your own Mathematica code.

1 Introduction

This paper presents numerical testings concerning the following conjecture exhibited by Chowla and Chowla in [1]. For any positive integer k there exist infinitely many primes P with the continued fraction expansion of \sqrt{P} having period k . The conjecture improves the similar already proved results for positive integers and, as a special case, for square free numbers. The validation of this conjecture would prove in the case k = 1 , for example, that there are infinitely many primes of the form m^{2} + 1 , m ∈ Z .

2 Basic Definitions and Notations

Definition 2.1 An expression of the form

1 + _{\frac{1}{a_{2}+_{\frac{1}{a_{3}+ \frac{1}{a_{4}+...}}}}}

is called a simple continued fraction.We shall denote it more convenientely by the symbol [a_{1}, a_{2}, a_{3}, ..., a_{n}, ...]. The terms a_{1}, a_{2}, a_{3}, ... are called the partial quotients of the continued fraction. We will discuss only the cases when the partial quotients are positive integers.

Definition 2.2 We denote by \frac{p_{n}}{q_{n}} = [a_{1}, a_{2}, ..., a_{n}] the n th convergent of the simple continued fraction from (1) . Thus, p_{n} and q_{n} are the positive integer numerator and denominator of the n th convergent.

Definition 2.3 A continued fraction which is periodic from the first partial quotient is called purely periodic. If the period starts with the second partial quotient, the continued fraction is called simply periodic . We shall denote a simply periodic continued fraction by [a_{0}, \overline{a_{1}, a_{2}, ⋯, a_{n}}]

Definition 2.4 A quadratic irrational α is said to be reduced if α > 1 is the root of a quadratic equation with integral coefficients whose conjugate root α̃ lies between -1 and 0. A reduced quadratic irrational associated to D can be written as \frac{P +\sqrt{D}}{Q}, where P, D, Q are integers, D, Q > 0.

Definition 2.5 For a given k ∈ Z_{+} and a set of positive integers {a_{n}}_{n=0,1,···,k−1} we define P_{−1} = 1, Q_{−1} = 0 P_{0} = a_{0}, Q_{0} = 1 P_{n} = a_{n}P_{n−1} + P_{n−2}, Q_{n} = a_{n}Q_{n−1} + Q_{n−2} for n = 1, 2, ⋯, k − 1

3 A Few General Results

This section provides the necessary background for working with the continued fractions of \sqrt{N}, where N∈ Z_{+}. For more similar results, see [4]. Most of the results presented here are encountered there.

Theorem 3.1 If α is a reduced quadratic irrational,then the continued fraction for α is purely periodic.

In order to prove the theorem we need a preliminary lemma:

Lemma 3.2 For any given D there is only a finite number of reduced quadratic irrational associated to it.

Proof of Lemma 3.2 :If α is a reduced quadratic irrational, α̃ is its conjugate and α = \frac{P +\sqrt{D}}{Q}, then

α = \frac{P +\sqrt{D}}{Q} > 1, and − 1 < α̃ = \frac{P −\sqrt{D}}{Q} < 0

The conditions α > 1 and α̃ > −1 imply that α+α̃ > 0, or \frac{2P}{Q} > 0, and since Q > 0 we conclude that P > 0. Also from α̃ < 0 and Q > 0 it follows that 0 < P < \sqrt{D}. The inequality α > 1 implies that P + \sqrt{D} > Q and, thus Q < 2\sqrt{D}. Once D is fixed there is only a finite number of positive integers P and Q such that P < \sqrt{D} and Q < 2\sqrt{D}, which proves the assumption.

Proof of Theorem 3.1: As α is a reduced quadratic irrational it can be uniquely expressed as \frac{P +\sqrt{D}}{Q}, where P, D, Q are positive integers. We can express α in the form α = a_{1}+ \frac{1}{α_{1}} , where a_{1} is the largest integer less than α, and where

α_{1} = \frac{1}{α−a_{1}} = \frac{P_{1}+\sqrt{D}}{Q_{1}} > 1

is again a reduced quadratic irrational associated with D. Repeating step by step the process we convert α into a continued fraction such that for every n,

α_{n−1} = a_{n} + \frac{1}{α_{n}}

(2)

where α = α_{0}, α_{1}, ... are all the quadratic irrationals associated with D and where a_{1}, a_{2}, .. are the partial quotients of the continued fraction expansion. From the above lemma we have that we must arrive to a reduced quadratic irrational which has occured before, so that α_{k} = α_{l}, for 0 ≤ k < l. As

α_{k} = a_{k+1} + \frac{1}{α_{k+1}} = α_{l} = a_{l+1} + \frac{1}{α_{l+1}} ,

and since a_{k+1} and a_{l+1} are the greatest integers less than α_{k} = α_{l}, we conclude that a_{k+1} = a_{l+1}. It then follows that α_{k+1} = α_{l+1}. Thus we have that from lth partial quotient, the continued fraction for α is periodic. We show next that α_{k} = α_{l} for 0 < k < l implies α_{k−1} = α_{l−1}, α_{k−2} = α_{l−2}, …, α_{0} = α_{l−k}. Let α̃_{k} = α̃_{l} be the conjugates of the equal complete quotients α_{k} and α_{l}. Then, it follows that

β_{k} = −\frac{1}{α̃_{k}} = −\frac{1}{α̃_{l}} = β_{l}

If k ≠ 0, then by taking conjugates in (2), we obtain

α̃_{k−1} = a_{k} + \frac{1}{α̃_{k}} and α̃_{l−1} = a_{l} + \frac{1}{α̃_{l}}

(3)

and thus

β_{k} = a_{k} + \frac{1}{β_{k−1}} and β_{l} = a_{l} + \frac{1}{β_{l−1}}

(4)

Since α_{k−1}, α_{l−1} are reduced, we have that

0 < −α̃_{k−1} = \frac{1}{β_{k−1}} < 1 and 0 < −α̃_{l−1} = \frac{1}{β_{l−1}} < 1

Thus, a_{k} and a_{l} in (4) are the largest integers less than β_{k}, β_{l}, respectively;from β_{k} = β_{l} we get that a_{k} = a_{l}. Thus, from equation (3) we get that α_{k−1} = α_{l−1}. Continuing this process we get that α_{k−2} = α_{l−2}, ⋯, α_{0} = α_{l−k}. As for each α_{n}, a_{n} is the greatest integer less than α_{n}, we get that a_{0} = a_{k−l}, a_{1} = a_{k−l+1}, · · ·. Thus the continued fraction of α is purely periodic and we can write α = \overline{[a_{0}, a_{1}, ⋯, a_{l−k−1}]}. This completes the proof of the theorem.

Corollary 3.3 For any N, positive integer which is not a perfect square, the continued fraction of \sqrt{N} is simply periodic, more precisely

\sqrt{N} = [a_{1}, \overline{a_{2}, a_{3}, ⋯, a_{n}, 2a_{1}]}, for some n

Proof: Let a_{1} be the greatest integer less than \sqrt{N}. Then \sqrt{N} + a_{1} > 1 and its conjugate, −\sqrt{N} + a_{1} lies between −1 and 0. Thus,\sqrt{N} + a_{1} is a reduced quadratic irrational with the greatest integer less than it equal to 2a_{1}. We can apply Theorem 3.1:

\sqrt{N} + a_{1} = \overline{[2a_{1}, a_{2}, ⋯, a_{n}]} for some n

which is equivalent to

\sqrt{N} + a_{1} = [2a_{1}, \overline{a_{2}, a_{3}, ⋯ a_{n}, 2a_{1}}]

consequently

\sqrt{N} = [a_{1}, \overline{a_{2}, a_{3}, ⋯, a_{n}, 2a_{1}}] where a_{1} > 0

Theorem 3.4 If for a reduced quadratic integer α = \overline{[a_{1}, a_{2}, ⋯, a_{n}]} we denote by β = \overline{[a_{n}, a_{n−1}, ⋯, a_{1}]} the continued fraction for α with period reversed, then −\frac{1}{β} = α̃ is the conjugate root of the equation satisfied by α .

Proof: We know that if \frac{p_{n}}{q_{n}} = [a_{1}, a_{2}, ⋯, a_{n}] then p_{n} = a_{n}p_{n−1} + p_{n−2}, thus \frac{p_{n}}{p_{n−1}} = a_{n} + _{\frac{1}{\frac{p_{n−1}}{p_{n−2}}}} , for any n. Thus, we get recursively that \frac{p_{2}}{p_{1}} = [a_{2}, a_{1}],..., \frac{p_{n}}{p_{n−1}} =

[a_{n}, a_{n−1}, ⋯, a_{1}] = \frac{p̃_{n}}{q̃_{n}}. Similarly, we get that \frac{q_{n}}{q_{n−1}} = [a_{n}, a_{n−1}, ⋯, a_{2}] = \frac{p̃_{n−1}}{q̃_{n−1}} , where by \frac{p̃_{n}}{q̃_{n}} and \frac{p̃_{n−1}}{q̃_{n−1}} we understand the nth and the (n − 1)th convergents of the continued fraction [a_{n}, a_{n−1}, ⋯, a_{1}]. Since the fractions are already reduced we get that

p̃_{n} = p_{n}, p̃_{n−1} = q_{n}, q̃_{n} = p_{n−1} and q̃_{n−1} = q_{n−1}

(5)

We also have the recurrences

α = \frac{αp_{n}+p_{n−1}}{αq_{n}+q_{n−1}} and β = \frac{βp̃_{n}+p̃_{n−1}}{βq̃_{n}+q̃_{n−1}}

(6)

According to (5) we notice that

β = \frac{βp_{n}+q_{n}}{βp_{n−1}+q_{n−1}}

And, thus from (6) we get that α and −\frac{1}{β} satisfy the same quadratic equation. We conclude that −\frac{1}{β} = α̃ where β = \overline{[a_{n}, a_{n−1}, ⋯, a_{1}]} .

Lemma 3.5 Except for the term 2a_{1} the periodic part of the continued fraction of \sqrt{N} is symmetrical.

Proof: From the continued fraction of \sqrt{N} we get that \sqrt{N}−a_{1} = \overline{[0, a_{2}, a_{3}, ⋯, a_{n}, 2a_{1}]}. We can easily get now that

\frac{1}{\sqrt{N}−a_{1}} = \overline{[a_{2}, a_{3}, ⋯, a_{n}, 2a_{1}]}

(7)

From Theorem 3.4 we get that

\frac{1}{\sqrt{N}−a_{1}} = \overline{[a_{n}, a_{n−1}, ⋯, 2a_{1}]}

(8)

where a_{1} −\sqrt{N} is the conjugate of the reduced quadratic a_{1} +\sqrt{N}. However, we know that the continued fraction expansions are unique. Comparing (7) and (8) we conclude that

a_{n} = a_{2}, a_{n−1} = a_{3}, ⋯, a_{3} = a_{n−1}, a_{2} = a_{n}

Thus, except for the term 2a_{1} the periodic part of the continued fraction of \sqrt{N} is symmetrical.

We must acknowledge that the set of numbers that have simply periodic, almost symmetrical continued fractions is much larger than the one mentioned above.We have the more general result presented in [7] that states that the square roots of the rational numbers greater than the unity have the above property. Thus, we must be careful when we analyse simply period continued fractions. We will show however that , except for one observation, Lemma 3.5 is the best description one can get for continued fractions of square roots of positive integers.

4 Main Theoretical Results

This section presents a theoretical result obtained in [5].The proof, in its majority, is reproduced ad-literam from [5].The purpose is to introduce the reader to a theoretical result that will be tested numerically in the last part of this report.

Theorem 4.1 Let N be a square free positive integer. By [\sqrt{N}] we denote the greatest integer less than \sqrt{N}. Then the equation

\sqrt{N} = [[\sqrt{N}], \overline{a_{1}, a_{2}, ⋯, a_{k−2} = a_{2}, a_{k−1} = a_{1}, a_{k} = 2[\sqrt{N}]}]

has for any symmetric set of positive integers a_{1}, a_{2}, ⋯, a_{k−1}, infinitely many solutions whenever either Q_{k−2} or (Q^{2}_{k−2} − (−1)^{k})/Q_{k−1} is even. If both quantities are odd then there are no solutions N even if the square free condition is dropped.

We first need a technical lemma:

Lemma 4.2 With P_{n} and Q_{n} as in Definition 2.5 we have the equations

\frac{xP_{k−1}+P_{k−2}}{xQ_{k−1}+Q_{k−2}} = [a_{0}, a_{1}, ⋯, a_{k−1}, x] where x ∈ R^{+}

(9)

and also

P_{n}Q_{n−1} − P_{n−1}Q_{n} = (−1)^{n+1} for n = 0, 1, ⋯, k − 1

(10)

Proof of Lemma: The first equation is easily obtained by induction while for the second one refer to Chapter 5, Introduction to Continued Fractions from the lecture notes. Proof of the Theorem: Replacing x with \sqrt{N} +a_{0} in equation (9) and for the equation in the theorem to hold we get that

\frac{(\sqrt{N}+a_{0})P_{k−1}+P_{k−2}}{(\sqrt{N}+a_{0})Q_{k−1}+Q_{k−2}} = [a_{0}, a_{1}, ⋯, a_{k−1}, \sqrt{N} + a_{0}] = \sqrt{N}

(11)

Where in writing this formula we have used the equivalence of expressions for the simply periodic continued fraction of a real number x :

x = [a_{0}, \overline{a_{1}, ⋯, a_{k−1}, 2a_{0}}] = [a_{0}, a_{1}, ⋯, a_{k−1}, x + a_{0}]

Equation (11) gives us:

P_{k−1} = a_{0}Q_{k−1} + Q_{k−2} and NQ_{k−1} = a_{0}P_{k−1} + P_{k−2}

(12)

Equation (10) , for n = k − 1 gives us

P_{k−2} = (P_{k−1}Q_{k−2} − (−1)^{k})/Q_{k−1}

These three equations give the sufficient condition for n to be an integer with the desired continued fraction expansion:

(N − a^{2}_{0})Q_{k−1} − (2a_{0})Q_{k−2} = (Q^{2}_{k−2} − (−1)^{k})/Q_{k−1}

(13)

From equation (10) we get that Q_{k−2} and Q_{k−1} are coprime.To find the expressions for N and a_{0} we need the following lemma:

Lemma 4.3 If a and b are positive coprime integers then the integer solutions x and y of:

xa − yb = z, with z an integer

are those of the form:

x = zd + mb and y = zc + ma

where m is any integer and as a and b are coprime d and c are the integers such that da − bc = 1 .

Proof of Lemma: It is obvious that such x and y are integer solutions of the equation. For x and y solutions of the equation let x_{1} = x − zd and y_{1} = y − zc. We have thus that x_{1}a − y_{1}b = 0. As a and b are coprime we get that there exists m an integer such that x_{1} = mb and y_{1} = ma. This proves our assumption. We conclude from the lemma and equation (12) that for N − a_{0}^{2} and 2a_{0} to satisfy equation (13) we must have that:

N − a_{0}^{2} = (−1)^{k+1}(Q^{2}_{k−2} − (−1)^{k})^{2}/Q^{2}_{k−1} + mQ_{k−2} and
2a_{0} = (−1)^{k+1}Q_{k−2}(Q^{2}_{k−2} − (−1)^{k})/Q_{k−1} + mQ_{k−1}

Where m ≥ m_{0}, m_{0} is the smallest positive integer such that N − a_{0}^{2} and 2a_{0} are positive quantities. As m is chosen such that N − a_{0}^{2} and 2a_{0} are positive quantities, then the only condition that has to be satisfied such that \sqrt{N} to have the desired continued fraction is to make 2a_{0} a positive integer. We have four possible cases:

Case 1: Q_{k−2} ≡ 0(mod 2). In this case (Q_{k−2}, Q_{k−1}) = 1 ⇒ Q − k − 1 ≡ 1(mod 2) and the even m are the only solutions that will force 2a_{0} ≡ 0(mod 2). Case 2: Q_{k−1} ≡ Q_{k−1} ≡ 1(mod 2). This time only even m are solutions. Case 3:Q_{k−2} ≡ 1(mod 2), Q_{k−1} ≡ (Q^{2}_{k−2} − (−1)^{k})/Q_{k−1} ≡ 0(mod 2). Here all m satisfy. Case 4: Q_{k−2} ≡ (Q^{2}_{k−2} − (−1)^{k})/Q_{k−1} ≡ 1(mod 2). We have, thus that Q_{k−1} ≡ 0(mod 2) and there are no m ∈ Z such that a_{0} ∈ Z . This case proves the second part of the theorem. For case 1 and 2 we see that N has the desired continued fraction expansion exactly when:

N = {(−1)^{k+1}Q_{k−2}(Q_{k−2}^{2} − (−1)^{k})/2Q_{k−1} + bQ_{k−1}^{2} + 2bQ_{k−2}+
(−1)^{k+1}(Q_{k−2}^{2} − (−1)^{k})^{2}/Q_{k−1}^{2} = αb^{2} + βb + γ = N(b) for b ∈ Z and
b_{0} = m_{0}/2
α = Q_{k−1}^{2},
β = 2Q_{k−2} − (−1)^{k}Q − k − 2(Q_{k−2}^{2} − (−1)^{k}),
γ = (Q_{k−2}^{2}/4 − (−1)^{k})(Q_{k−2}^{2} − (−1)^{k})^{2}/Q_{k−1}^{2}

And the discriminant δ = β^{2} − 4γ = 4(−1)^{k}. For case 3 we obtain again that

N = N(b) = αb^{2} + βb + γ

where this time the integral coefficients are

α = Q_{k−1}^{2}/4

β = Q_{k−2} − (−1)^{k}Q − k − 2(Q_{k−2}^{2} − (−1)^{k})/2
γ = (Q_{k−2}^{2}/4 − (−1)^{k})(Q_{k−2}^{2} − (−1)^{k})^{2}/Q_{k−1}^{2}

Here δ = β^{2} − 4αγ = (−1)^{k}, thus, δ = 1 and k is even. We are stating now the last two lemmas that are going to give us the final result:

Lemma 4.4 With the above notation we have that for any prime p, N(n) ≡ 0(mod p^{2}) for at most two n in any residue system modulo p.

Proof:For p = 2 as n goes through a complete residue system modulo4, N(n) takes on values γ, α + β + γ, 2β + γ, and α − β + γ . If Q_{k−1} ≡ 1(mod 2) we have α ≡ 1(mod 2) and if Q_{k−1} ≡ 0(mod 2) then δ = (−1)^{k} implies that β ≡ 1(mod 2). Thus, we can see that at most two of the four values can be congruent to 0 mod 4. For p an odd prime, assume that p|N(b), say N(b) ≡ lp(mod p^{2}). Then N(b + np) ≡ 2αbnp + βnp + lp(mod p^{2}). We have N(b + np) ≡ 0(mod p^{2})⇔ l + (2αb + β)n ≡ 0(mod p). But N(b) ≡ 0(mod p) and as p does not divide δ implies that p does not divide 2αb + β and so (2αb + β) is invetible modulo p. Thus, l + (2αb + β)n ≡ 0(mod p) for exactly one choice of n modulo p. Still, p | N(b) is possible for at most two choices of b(mod p) as p |̸δ ⇒ αx^{2} + βx + γ is not identically congruent to 0 mod p. Thus, there are at most two n in any residue system modulo p^{2} such that N(n) ≡ 0(mod p^{2}). The last lemma finishes off the proof of the main theorem:

Lemma 4.5 Define the density D= lim_{n→∞}(number of square free N(b) with b ≤ n)/n. Then D > 0.

Proof of lemma:Using the previous lemma we get that

D ≥ ∏_{p prime}(1 − \frac{2}{p^{2}} ) ≥ ∏_{n=2}^{∞}(1 − \frac{2}{n^{2}} ) = exp \{∑_{n=2}^{∞} ln(1 − \frac{2}{n^{2}} \}

≥ exp \{∑_{n=2}^{∞} \frac{−4}{n^{2}}\} as ln(1 − 2/n^{2}) > −4/n^{2} for n ≥ 2,

≥ exp {−4π^{2}/6} > 0.

It has been suggested in [3] that we can improve the approximation of D.If we consider that 1 − \frac{2}{p^{2}} < 1 − \frac{1}{p^{2}} , then we can approximate D by 1/ζ^{2}(2), where ζ is the Riemann- zeta function. We get a correction factor C where

∏_{p prime}(1 + \frac{2}{p^{4}} ) ≥ C ≥ ∏_{p prime}(1 + \frac{1}{p^{4}} )

. This leaves us with a theoretical approximation for D.

Corollary 4.6 For any positive integer k there exist infinitely many integers N with a continued fraction expansion of period k.

Proof of the corollary: We must find a symmetric set {a_{n}}_{n=1,2,···,k−1} such that the conditions of Theorem 4.1 that give us an integer N are fulfilled. For k = 1 then N(b) = b^{2} + 1 gives us infinitely many square free N (as Q_{−1} = 0 and Q_{0} = 1 by definition). For k > 1 a good example of such set are the Fibonacci numbers. Thus, for k ≡ 0(mod 3) set a_{i} = 1 for i = 1, …, k−1. For k ≢ 0(mod 3), let a_{1} = a_{k−1} = 2 and a_{i} = 1 for i = 2, …, k − 2. In both cases we have the recursion formula for Q_{n} giving us copies of the Fibonacci sequence( F_{1} = F_{2} = 1 and F_{n} = F_{n−1} + F_{n−2} for n ≥ 3 define the sequence). For k ≡ 0(mod 3) we have that Q_{n} = F_{n+2} for i = 1, …, k − 2 and Q_{k−1} = 2Q_{k−2} + Q_{k−3} = 2F_{k} + F_{k−1} + F_{k+2}. If k ≢ 0(mod 3), Q_{n} = F_{n+2} for n = 1, …, k − 1, hence Q_{k−1} = F_{k}. As F_{3} = 2 is even, we can prove inductively that F_{k} is even only when k ≡ 0(mod 3). If k ≡ 0(mod 3), then by the induction hypotesis F_{k−1} and F_{k−2} are odd. From the recurrence relation for the Fibonacci numbers we get that F_{k} is even. Similarly we get now that F_{k+1} and F_{k+2} are odd. This property proves also that Q_{k−1} is odd for any k. Therefore, either Q_{k−2} or (Q_{k−2}^{2} − (−1)^{k})/Q_{k−1} is even and we have satisfied the conditions of the Theorem 4.1, which proves the Corollary.

5 Computations and Conjectures

Lemma 4.5 presents a loose approximation of the density of square free numbers among positive integers whose square roots satisfy Theorem 4.1. We present here a few numerical testings that compare the theoretical results obtained for square free numbers with the behaviour of the prime numbers. We have thus the conjecture formulated by Chowla in [1] that will be numerically tested:

Conjecture 5.1 For any positive integer k there are infinitely many primes p with the continued fraction expansion of \sqrt{p} having length k.

A first step would be a better evaluation of the behaviour of the square free numbers. The lower limit obtained in Lemma 4.5 gives us a density greater than exp^{{−4π^{2}/6}} ≈ 0.00138822. We have first tested the behaviour for the case k = 1 and moreover, for N(b) = b^{2} + 1.If we denote by D(n) =(number of square free N(b) with b ≤ n)/n, then the differenceD(n + 1) − D(n) goes very quickly to 0. We have the table with a few relevant data:

n D(n+1)- D(n) 55 0.00547963 10000 -0.0000657896 20000 -0.0000456785 34994 -0.0000266564

As we know that there is a lower boundary for D and D(n + 1) − D(n) is always negative and constantly going to 0, we can conjecture that D goes assymptotically to a positive constant. To support this idea, we have a result that characterizes assymptotically the behaviour of Q(n) = number of square free numbers less than n. Gegenbauer determined in [2] that Q(n) = (6/π^{2})n + O(\sqrt{n}). This result gives us an upper limit for D, D < 6/π^{2} ≈ 0.6079271, upper limit that does not depend on k. However, D(n) does not seem to have the same error term, O(\sqrt{n})/n, as Q(n)/n does. Numerical results show that D(n) converges much faster, which is to be expected as N(b), b = 0, , n cannot cover all the square free numbers less than n. The same test applied to the density function for prime numbers gives totally different results.We have, thus, a few relevant values for D(n + 1) − D(n) which exhibits a decreasing pattern:

n D(n+1)-D(n)

50 -0.012859 500 -0.012859 1050 -0.000920261

Still, we cannot find a lower limit for D in this case.If D were greater than 0 this would prove the conjecture. The condition is not necessary, as it might be too strong for the statement we want to prove. If D > 0 this asserts that not only are there infinitely many prime numbers with continued fraction of a given length but that there are infinitely many which satisfy Theorem 4.1. We can, thus, focus on the lengths of the periods of continued fractions for prime numbers, no matter the partial quotients of the continued fraction. Numerical testings exhibit very interesting results that I could verify for very large numbers, up to 30,000,000. We can, thus, state a conjecture:

Conjecture 5.2 Let p be a prime number. If we define m = min x,where x integer and the length of the period of the continued fraction of \sqrt{x} is equal to p, then m is also a prime number.

I was able to verify a similar result, for p square free, but only up to x = 100, 000. A similar statement for any p positive integer is false and the counterexample is p = 8 and m = 44 where \sqrt{44} = [6, \overline{1, 1, 1, 2, 1, 1, 1, 12}]. Conjecture 5.2, if true, proves that at least for p square free there are prime numbers with continued fraction expansion with period of length p. Still, the experiments have been carried only up to x = 30, 000, 000, thus analyzing less than 2000 possible prime periods.For a better assement, we define for p prime:

F (p_{0}) = \frac{p_{0}}{CF L(p_{0})},

(14)

where CF L(p_{0}) is the number of different lengths of periods of the continued fraction of p, for p prime, p < p_{0}. For p_{0} square free define F_{1}(p_{0}) in a similar way, but this time CF L_{1}(p_{0}) is the number of different lengths of periods of the continued fraction of p, for p square free, p < p_{0}

Interestingly enough, although π(n) ≈ \frac{n}{ln n}(where π(n) is the number of primes less than n) ^{1} and Q(n) ≈ (6/π^{2})n , the functions defined in equation(14) are similar for prime and square free numbers. We have the data:

p_{0}, F (p_{0}), F_{1}(p_{0}) 17989, 74.334 , 71.669 50021, 121.6 , 118.8 100003, 176.3 , 171.5

This similarity is exhibited for all square free numbers tested up to 200,000. This numerical result completes Conjecture 5.2 which accounted for such a property only for prime lengths of continued fraction expansions.

6 For those who come after

Although there is not much that we know about the summing and product rules for continued fraction, the properties tested above could mean that the continued fraction expansion of the square root of a positive integer x depends on its factorization into prime numbers.An experiment to test this hypotesis could prove to be very important in verifying the validity of Conjecture 5.2. In order to generalize the results obtained for square free numbers (Theorem 4.1) to the set of prime numbers we must first find a theoretical approach to D(n) defined for prime numbers.The results obtained in this paper were purely empirical and a further pace would be the theoretical approach.I have performed tests in Mathematica for very large numbers but taking in account that the density of the prime numbers is going to 0 when we increase the number of integers tested, shows us that we have only characterized a very small number of continued fractions of prime numbers.As my approach was qualitative and not quantitative I definitely believe that the stated conjectures are hardly approachable by empirical means.

1for the Prime Number Theorem refer to Chapter 3, Introduction to Number Theory, from the lecture notes

Bibliograpy

[1] P.Chowla and S.Chowla, Problems on periodic continued fractions, Proc. Nat. Acad. ci. U.S.A., 69(1972), 37-45

[2]result mentioned in Greger, Karl, Mathematics Magazine, Volume 51, Issue 4(Sep. 1978), 211-219

[3] Notes for Princeton Junior Seminar, Fall 2002: Diophantine Analysis and Roth’s Theorem, R. Takloo-Bighash, S. J. Miller, H. Helfgott, F. Spinu, Princeton University, 2002, also includes suggestions from the professors

[4]C.D.Olds, Continued Fractions, Yale University, 1963

[5]Friesen, Christian, On continued fractions of given period, Proceedings of the American Mathematical Society, Volume 103, Number 1, May 1988

[6]G.H.Hardy and E.M. Wright, An Introduction to the Theory of Numbers, Oxford at the Clarendon Press, 1938 [7]O.Perron, Die Lehre von den Kettenbruchen, Volume I, Stuttgart, 1954