Alicable Analysis and Discrete Mathematics available online at htt://efmath.etf.rs Al. Anal. Discrete Math. 4 (010), 3 44. doi:10.98/aadm1000009m HENSEL CODES OF SQUARE ROOTS OF P-ADIC NUMBERS Zerzaihi Tahar, Kecies Mohamed, Michael Kna In this work we are concerned with the calculation of the Hensel codes of square roots of -adic numbers, using the fixed oint method and this through the calculation of the aroached solution of f(x) = x a = 0 in Q. We also determine the seed of convergence and the number of iterations. 1. INTRODUCTION The knowledge of the arithmetic and algebraic roerties of the -adic numbers is useful to the study of their Diohantine roerties and the roblems of aroximations. In this resent aer we will see how we can use classical rootfinding methods (fixed oint) and exlore a very interesting alication of tools from numerical analysis to number theory. We use this method to calculate the zero of a -adic continuous function f defined on a domain D Q, where f : Q Q x f(x). To calculate the square root of a -adic number a Q, one studies the following roblem (1) { f(x) = x a = 0 a Q, rime number. Our goal is to calculate the Hensel code of a, which means to determine the first numbers of the -adic develoment of the solution of the revious equation, 000 Mathematics Subject Classification. 6E30. 34K8. Keywords and Phrases. P -adic number, square root, Hensel code, fixed oint, seed of convergence. 3
Hensel codes of square roots of -adic Numbers 33 and this solution is aroached by a sequence of the -adic numbers (x n ) n Q constructed by the fixed oint method. We first encountered this idea in [4] where the authors used the numerical methods to find the recirocal of an integer modulo n (see [4] for more details). We are grateful to Dr. Henry Alex Esbelin (Laboratoire d Algorithmique et Image de Clermont-Ferrand) for suggesting this toic to us, and also for several helful conversations.. PRELIMINARIES Definition.1. Let be a rime number. The field of -adic numbers Q is defined as the comletion of the field of rational numbers with resect to the -adic metric determined by the -adic norm. Thus, Q is obtained from the -adic norm in the same way as the real field R is obtained from the usual absolute value as the comletion of Q. Here, the function is called the -adic norm and is defined by x Q : x = { v (x) if x 0 0 if x = 0, and v is the -adic valuation defined by v (x) = max {r Z : r x}. The -adic distance d is defined by d : Q Q R + {0} (x, y) d (x, y) = x y. Theorem.. Every -adic number a Q has a unique -adic exansion a = λ n n + λ n+1 n+1 + + λ 1 1 + λ 0 + λ 1 + λ + = λ k k with λ k Z and 0 λ k 1 for each k n. The short reresentation of a is λ n λ n+1... λ 1 λ 0 λ 1..., where only the coefficients of the owers of are shown. We can use the -adic oint as a device for dislaying the sign of n as follows: λ n λ n+1... λ 1 λ 0 λ 1... for n < 0 λ 0 λ 1... for n = 0 00... 0λ 0 λ 1... for n > 0. k=n Definition.3. A -adic number a Q is said to be a -adic integer if this canonical develoment contains only non negative owers of. The set of -adic
34 Zerzaihi Tahar, Kecies Mohamed, Michael Kna integers is denoted by Z. So we have { } Z = λ k k, 0 λ k 1 = k=0 { } a Q : a 1. Definition.4. A -adic integer a Z is said to be a -adic unit if the first digit λ 0 in the -adic develoment is different from zero. The set of -adic units is denoted by Z. Hence we have { } Z = λ k k, λ 0 0 = k=0 { } a Q : a = 1. Proosition.5. Let a be a -adic number. Then a can be written as the roduct a = n u, n Z, u Z. Definition.6. Let be a rime number. Then the Hensel code of length M of any -adic number a = m u Q is the air (mant a, ex a ), where the left most M digits and the value m of the related -adic develoment are called the mantissa and the exonent, resectively. We use the notation H(, M, a) where is a rime and M is the integer which secifies the number of digits of the -adic develoment. One writes H(, M, a) = (a m a m+1... a 0 a 1... a t, m), where M = m + t + 1. See also [1] for more general results concerning the Hensel code. Lemma.7. (Hensel s Lemma) Let F (x) = c 0 + c 1 x + c x + + c n x n be a olynomial whose coefficients are -adic integers. Let F (x) = c 1 + c x + + nc n x n 1 be the derivative of F (x). Suose a 0 is a -adic integer which satisfies F (a 0 ) 0 (mod ) and F (a 0 ) 0 (mod ). Then there exists a unique -adic integer a such that F (a) = 0 and a a 0 (mod ). Proof. For the roof of this result we refer the reader to [5]. The following theorem makes an imortant connection between -adic numbers and congruences. Theorem.8. A olynomial with integer coefficients has a root in Z if and only if it has an integer root modulo k for every k 1. Proof. For the roof see [5].
Hensel codes of square roots of -adic Numbers 35 A ractical consequence of Theorem.8 is the following. Proosition.9. A rational integer a not divisible by has a square root in Z ( ) if and only if a is a quadratic residue modulo. Proof. Let P (x) = x a. Then P (x) = x. If a is a quadratic residue, then a a 0 (mod ) for some a 0 {0, 1,,..., 1}. Hence P (a 0 ) 0 (mod ). But P (a 0 ) = a 0 0 (mod ) automatically since (a 0, ) = 1, so that the solution in Z exists by Hensel s lemma. Conversely, if a is a quadratic nonresidue, by Theorem.8 it has no square root in Z. This can actually be extended to Corollary.10. Let be a rime. An element x Q is a square if and only if it can be written x = n y with n Z and y Z a -adic unit. Proof. For the roof of this result we refer the reader to [3]. 3. MAIN RESULTS Let a Q be a -adic number such that a = v(a) = m, m Z. If (x n ) n is a sequence of -adic numbers that converges to a -adic number α 0, then from a certain rank one has x n = α. We also know that if there exists a -adic number α such that α = a, then v (a) is even and x n = α = m. 3.1 Fixed oint method To use the fixed oint method we study the zeros of the equation f(x) = 0 by studying a related equation x = g(x), with the condition that these two formulations are mathematically equivalent. To imrove the seed of convergence of the sequence (x n ) n, one defines a new sequence that converges more quickly toward the solution of the equation roosed. The conditions that ermit the determination of the function g(x) are: 1) g( a) = a, g (1) ( a) =... = g (s 1) ( a) = 0, g (s) ( a) 0,
36 Zerzaihi Tahar, Kecies Mohamed, Michael Kna ) The olynomial g(x) must not have the square root of a in its coefficients. In order to choose g(x), we know that if a is a root of order s of (g(x) a), then there is a olynomial h(x) such that () g(x) = a + (x a) s h(x). The conditions that ermit the determination of h(x) are: i. The olynomial g(x) must not have a in its coefficients ii. h(x) deends uon the natural number s. To determine the formula for h(x), it is sufficient to work with the undetermined coefficients and to write the wanted conditions. Let s consider the following cases. Case 1: s = 1. We have g(x) = a + (x a)h(x). One chooses h(x) in order to make the square roots of a in the coefficients of g(x) disaear. For this, we ut (3) h(x) = α 0. This gives α 0 = 1 and (4) g(x) = x. Case : s =. We have (5) g(x) = a + (x a) h(x). We ut (6) h(x) = α 0 + α 1 x, and get Then we have α 0 = 1 a 1/, α 1 = 1 a. (7) h(x) = 1 a (x + a) and g(x) = 3 x 1 a x3. The sequence associated to g(x) is defined by (8) n N : x n+1 = 3 x n 1 a x 3 n. Theorem 3.1. If x n0 is the square root of a of order r, then
Hensel codes of square roots of -adic Numbers 37 1) If, then x n+n0 is the square root of a of order n r ( n 1)m. ) If =, then x n+n0 is the square root of a of order n r (m + 1)( n 1). Proof. Let (x n ) n the sequence defined by (8). Then (9) n N : x n+1 a = 1 4a ( 4a x n ) ( a x n ). We ut Since (10) 4 = Ω(x) = 1 4a ( 4a x ). 1 if = 4 1 if, we have Ω(x n0 ) = 1 ( ) 4a x 4a n0 1 4 1 a max { 4a, } x n0 4m max { m, m} if 4m max { m, m} if = m if m+ if =. This gives and so we have x n0+1 a = Ω(x n0 ) a x n0, x n0+1 a m r if, Then x n0+1 a m+ r if =. x n 0+1 a 0 (mod r m ) if, x n 0+1 a 0 (mod r (m+1) ) if =. In this manner, we find that if, then (11) n N : x n+n 0 a 0 (mod γn ),
38 Zerzaihi Tahar, Kecies Mohamed, Michael Kna where the sequence (γ n ) n is defined by (1) n N : γ n = n r ( n 1)m. If =, then (13) n N : x n+n 0 a 0 (mod γ n ), where (γ n) n is defined by (14) n N : γ n = γ n ( n 1) = n r (m + 1)( n 1). On the other hand, we have ( (15) n N : x n+1 x n = x ) n (x a n a ). Since (16) = we have 1 if = 1 if, x n+n0+1 x n+n0 = x n+n 0 x a n+n0 a. Hence we obtain x n+n0+1 x n+n0 m m γn if and so Therefore, if, then x n+n0+1 x n+n0 m m γ n if =, x n+n0+1 x n+n0 0 (mod γn m ) if x n+n0+1 x n+n0 0 (mod γ n (m+1) ) if =. (17) n N : x n+n0+1 x n+n0 0 (mod vn ), where (18) n N : v n = γ n m = n r ( n+1 1)m. If =, then (19) n N : x n+n0+1 x n+n0 0 (mod v n ), where n N : v n = v n ( n+1 1) = n r ( n+1 1)(m + 1).
Hensel codes of square roots of -adic Numbers 39 Conclusion 3.. 1. If, then the following are true. (a) The seed of convergence of the sequence (x n ) n is the order v n. (b) If r m > 0, then the number of iterations to obtain M correct digits is ( ) M m ln r m (0) n = + 1. ln (c) With Hensel codes the equation (8) takes the form H(, n r ( n+1 1) m, x) = H(,, 3/) H(, n 1 r ( n 1) m, x). If =, then the following are true. H(,, 1/) H3 (, n 1 r ( n 1) m, x) H. (,, x) (a) The seed of convergence of the sequence (x n ) n is the order v n. (b) If r (m + 1) > 0, then the necessary number n of iterations to obtain M correct digits is ( ) M (m + 1) ln r (m + 1) (1) n = + 1. ln (c) With the Hensel codes the equation (8) takes the form H(, n r ( n+1 1) (m + 1), x) = H(,, 3/) H(, n 1 r ( n 1) (m + 1), x) H(,, 1/) H3 (, n 1 r ( n 1) (m + 1), x) H. (,, x) () Let s consider for the sets defined by { } S 1 = a Q : a = 1 { } S = a Q : a < 1 { } S 3 = a Q : a > 1 if m = 0 if m > 0 if m < 0. We ut v n (1) = n r if m = 0 (3) n N : v n () = n r ( n+1 1)m if m > 0 v n (3) = n r ( n+1 1)m if m < 0.
40 Zerzaihi Tahar, Kecies Mohamed, Michael Kna For =, we consider the sets defined by B 1 = {a Q : a = 4} if m = 1 (4) B = {a Q : a < 4} if m > 1 B 3 = {a Q : a > 4} if m < 1. We ut v n (1) = n r if m = 1 (5) n N : v n () = n r ( n+1 1)(m + 1) if m > 1 v n (3) = n r ( n+1 1)(m + 1) if m < 1. Then we have the following corollary. Corollary 3.3. 1. If, then we have the following. (a) If m = 0, then we have quadratic convergence for all the -adic numbers which belong to the set S 1. (b) If m < 0, then the seed of convergence is faster for all the -adic numbers which belong to the set S 3. (c) If m > 0, then the seed of convergence is slower for all the -adic numbers which belong to the set S.. If =, then we have the following. (a) If m = 1, then one has quadratic convergence for all the -adic numbers which belong to B 1. (b) If m < 1, then the seed of convergence is faster for all the -adic numbers which belong to the set B 3. (c) If m > 1, then the seed of convergence is slower for all the -adic numbers which belong to the set B. Case 3: s = 3. We ut (6) One finds that (7) g(x) = a + (x a) 3 h(x) h(x) = α 0 + α 1 x + α x. h(x) = 1 a + 9 8a a x + 3 8a x g(x) = 15 8 x 5 4a x3 + 3 8a x5.
Hensel codes of square roots of -adic Numbers 41 The sequence associated to g(x) is defined by (8) n N : x n+1 = 3 8a x 5 n 5 4a x 3 n + 15 8 x n. Let (x n ) n the sequence defined by (8). Then (9) n N : x n+1 a = ( a xn ) 3 ( 1 a + 33 64a 3 x n 9 ) 64a 4 x n 4. Theorem 3.4. If x n0 is the square root of a of order r, then the following are true. 1) If, then x n+n0 is the square root of a of order 3 n r (3 n 1)m. ) If =, then x n+n0 is the square root of a of order 3 n r (3 n 1)(m + 3). Proof. For the roof of this theorem, we use the method that we alied in the case where s =. From this theorem, we get that if, then (30) n N : x n+n 0 a 0 (mod πn ), where (π n ) n is defined by (31) n N : π n = 3 n r (3 n 1)m. If =, then (3) n N : x n+n 0 a 0 (mod π n ), where (π n) n is given by (33) n N : π n = 3 n r (3 n 1)(m + 3). On the other hand, we have (34) n N : x n+1 x n = ( a xn ) ( 7 8a x n 3 ) 8a x3 n. Then if, we have (35) n N : x n+n0+1 x n+n0 0 (mod Σn ), where (Σ n ) n is defined by (36) n N : Σ n = 3 n r ( 3 n 1)m. If =, then (37) n N : x n+n0+1 x n+n0 0 (mod Σ n ),
4 Zerzaihi Tahar, Kecies Mohamed, Michael Kna with (38) n N : Σ n = 3 n r ( ( 3 n 1)m + 3 n+1). Conclusion 3.5. 1. If, then the following are true. (a) The seed of convergence of the sequence (x n ) n is the order Σ n. (b) If r m > 0, then the number n of necessary iterations to obtain M correct digits is ( ) M m ln r m (39) n = + 1. ln 3 (c) With Hensel codes the equation (8) takes the form H(, 3 n r ( 3 n 1) m, x) = H(,, 3/8) H5 (, 3 n 1 r ( 3 n 1 1) m, x) H 4 (,, x) + H(,, 5/4) H3 (, 3 n 1 r ( 3 n 1 1) m, x) H (,, x) + H(,, 15/8) H(, 3 n 1 r ( 3 n 1 1) m, x).. If =, then the following are true. (a) The seed of convergence of the sequence (x n ) n is the order Σ n. (b) If r (m + 3) > 0, then the necessary number of iterations to obtain M correct digits is ( ) M m ln r (m + 3) (40) n = ln 3 + 1. (c) With Hensel codes the equation (8) takes the form H(, 3 n r ( ( 3 n 1) m + 3 n+1), x) = H(,, 3/8) H5 (, 3 n 1 r ( ( 3 n 1 1) m + 3 n), x) H 4 (,, x) + H(,, 5/4) H3 (, 3 n 1 r ( ( 3 n 1 1) m + 3 n), x) H (,, x) + H(,, 15/8) H(, 3 n 1 r ( ( 3 n 1 1) m + 3 n), x).
Hensel codes of square roots of -adic Numbers 43 3. Generalization Generally we can construct an iterative method that converges to a with a higher convergence rate. To accelerate the rate of convergence of the sequence (x n ) n as much as one wants, it is necessary to solve the roblem of letting (41) g(x) = a + (x a) s h(x, a) and choosing the function h(x, a) in order to make the square roots of a in coefficients of a function g(x) disaear. We take the degree of the function h(x) equal to s 1, giving (4) h(x) = α 0 + α 1 x + α x + + α s 1 x s 1 s 1 = α j x j. Then (43) g(x) = a+(x s 1 a) s (α 0 +α 1 x+α x + +α s 1 x s 1 ) = c j (α i, a )x j, where, if i {0,..., s 1}, (44) a + ( 1) s ( a) s α 0, if j = 0 and c j (α i, a) = j ( ) s α i ( 1) s j+i ( a) s j+i, if j {1,..., s } j i i=0 j=0 j=0 α s 1, if j = s 1, (45) α i = 0, i > s 1. To generalize the fixed oint method it is necessary that the coefficients of the even owers of x are equal to zero and according to the different calculations that we made, we suose that this condition is also sufficient until a certain s sufficiently large, i.e (46) j {0,..., s 1} : {c k } k {0,...,j} = {0} a {c k+1 } k {0,...,j}. Therefore, to determine (α i ) i {0,...,s 1} for any s, it is sufficient to solve the following linear system c 0 = a + ( 1) s ( a) s α 0 = 0 (47) c (α i, a) = 0 c 4 (α i, a) = 0. c s (α i, a) = 0., 0 i s 1
44 Zerzaihi Tahar, Kecies Mohamed, Michael Kna We get (48) g(x) = c 1 (a)x + c 3 (a)x 3 +... + c s 1 (a)x s 1. REFERENCES 1. C. K. Koc: A Tutorial on P -adic Arithmetic. Electrical and Comuter Engineering. Oregon State University, Corvallis, Oregon 97331. Technical Reort, Aril 00.. F. B. Vej: P -adic Numbers. Aalborg University, Deartment Of Mathematical Sciences. 7E 9 Aalborg st. Groue E3-104, 18-1-000. 3. F.Q. Gouvêa: P -adic Numbers: An Introduction. Second Edition. New York: Sringer-Verlag, 1997. 4. M. Kna, C. Xenohotos: Numerical analysis meets number theory: using rootfinding methods to calculate inverses mod n. Al. Anal. Discrete Math., 4 (010), 3 31. 5. S. Katok: Real and -adic analysis, Course notes for Math 497C. Deartment of Mathematics, The Pennsylvania State University, Mass Program, Fall 000 revised, November (001). Laboratoire de mathématiques ures et aliquées, (Received Setember 10, 009) BP 98 Ouled Aissa, Université de Jijel, Algeria E-mails: zerzaihi@yahoo.com kecmohamed@yahoo.fr Deartment of Mathematical Sciences, Loyola University Maryland, 4501 N. Charles Street, Baltimore, MD 110, USA E-mail: mkna@loyola.edu