ON SECOND-ORDER LINEAR RECURRENCE SEQUENCES: WALL AND WYLER REVISITED

Similar documents
CALCULATING EXACT CYCLE LENGTHS IN THE GENERALIZED FIBONACCI SEQUENCE MODULO p

198 VOLUME 46/47, NUMBER 3

THE p-adic VALUATION OF LUCAS SEQUENCES

#A11 INTEGERS 12 (2012) FIBONACCI VARIATIONS OF A CONJECTURE OF POLIGNAC

A Proof of the Lucas-Lehmer Test and its Variations by Using a Singular Cubic Curve

Acta Mathematica Universitatis Ostraviensis

RANK AND PERIOD OF PRIMES IN THE FIBONACCI SEQUENCE. A TRICHOTOMY

DIFFERENTIAL PROPERTIES OF A GENERAL CLASS OF POLYNOMIALS. Richard Andre-Jeannin IUT GEA, Route de Romain, Longwy, France (Submitted April 1994)

Introduction to Lucas Sequences

Chris Smyth School of Mathematics and Maxwell Institute for Mathematical Sciences, University of Edinburgh, Edinburgh EH9 3JZ, UK.

SECOND-ORDER RECURRENCES. Lawrence Somer Department of Mathematics, Catholic University of America, Washington, D.C

arxiv: v2 [math.nt] 29 Jul 2017

DISTRIBUTION OF FIBONACCI AND LUCAS NUMBERS MODULO 3 k

THE DIVISIBILITY PROPERTIES OF PRIMARY LUCAS RECURRENCES WITH RESPECT TO PRIMES

On Anti-Elite Prime Numbers

CONGRUENCES CONCERNING LUCAS SEQUENCES ZHI-HONG SUN

Mathematics for Cryptography

1. INTRODUCTION For n G N, where N = {0,1,2,...}, the Bernoulli polynomials, B (t), are defined by means of the generating function

AND RELATED NUMBERS. GERHARD ROSENBERGER Dortmund, Federal Republic of Germany (Submitted April 1982)

A CONGRUENTIAL IDENTITY AND THE 2-ADIC ORDER OF LACUNARY SUMS OF BINOMIAL COEFFICIENTS

Journal of Number Theory

Part II. Number Theory. Year

Partial Sums of Powers of Prime Factors

THE ORDER OF APPEARANCE OF PRODUCT OF CONSECUTIVE FIBONACCI NUMBERS

EXTENDING A THEOREM OF PILLAI TO QUADRATIC SEQUENCES

#A42 INTEGERS 10 (2010), ON THE ITERATION OF A FUNCTION RELATED TO EULER S

NOTES ON SIMPLE NUMBER THEORY

On The Discriminator of Lucas Sequences

-P" -p. and V n = a n + ft\ (1.2)

David Adam. Jean-Luc Chabert LAMFA CNRS-UMR 6140, Université de Picardie, France

A talk given at the City Univ. of Hong Kong on April 14, ON HILBERT S TENTH PROBLEM AND RELATED TOPICS

ADVANCED PROBLEMS AND SOLUTIONS

Selected Chapters from Number Theory and Algebra

ABSTRACT 1. INTRODUCTION

A LIMITED ARITHMETIC ON SIMPLE CONTINUED FRACTIONS

Here, logx denotes the natural logarithm of x. Mrsky [7], and later Cheo and Yien [2], proved that iz;.(»)=^io 8 "0(i).

MATH 361: NUMBER THEORY FOURTH LECTURE

Oleg Eterevsky St. Petersburg State University, Bibliotechnaya Sq. 2, St. Petersburg, , Russia

Cover Page. The handle holds various files of this Leiden University dissertation

4 Linear Recurrence Relations & the Fibonacci Sequence

Cullen Numbers in Binary Recurrent Sequences

Diophantine triples in a Lucas-Lehmer sequence

Covering Subsets of the Integers and a Result on Digits of Fibonacci Numbers

NOTE ON FIBONACCI PRIMALITY TESTING John Brillhart University of Arizona, Tucson, AZ (Submitted August 1996-Final Revision January 1997)

p = This is small enough that its primality is easily verified by trial division. A candidate prime above 1000 p of the form p U + 1 is

Y. H. Harris Kwong SUNY College at Fredonia, Fredonia, NY (Submitted May 1987)

THE CLASSIFICATION OF PLANAR MONOMIALS OVER FIELDS OF PRIME SQUARE ORDER

Some Congruences for the Partial Bell Polynomials

F A M I L I E S OF IDENTITIES INVOLVING SUMS OF POWERS OF THE FIBONACCI AND LUCAS NUMBERS

Lecture notes: Algorithms for integers, polynomials (Thorsten Theobald)

ADVANCED PROBLEMS AND SOLUTIONS

On arithmetic functions of balancing and Lucas-balancing numbers

Florian Luca Instituto de Matemáticas, Universidad Nacional Autonoma de México, C.P , Morelia, Michoacán, México

arxiv: v1 [math.co] 11 Aug 2015

ALGEBRA. 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers

w = X ^ = ^ ^, (i*i < ix

SOME IDENTITIES INVOLVING THE FIBONACCI POLYNOMIALS*

Part V. Chapter 19. Congruence of integers

= 1 2x. x 2 a ) 0 (mod p n ), (x 2 + 2a + a2. x a ) 2

Know the Well-ordering principle: Any set of positive integers which has at least one element contains a smallest element.

Largest Values of the Stern Sequence, Alternating Binary Expansions and Continuants

TAMAGAWA NUMBERS OF ELLIPTIC CURVES WITH C 13 TORSION OVER QUADRATIC FIELDS

ADVANCED PROBLEMS AND SOLUTIONS. Edited by Raymond E. Whitney

PELLANS SEQUENCE AND ITS DIOPHANTINE TRIPLES. Nurettin Irmak and Murat Alp

Summary Slides for MATH 342 June 25, 2018

On the number of representations of n by ax 2 + by(y 1)/2, ax 2 + by(3y 1)/2 and ax(x 1)/2 + by(3y 1)/2

G. Sburlati GENERALIZED FIBONACCI SEQUENCES AND LINEAR RECURRENCES

Sum and shifted-product subsets of product-sets over finite rings

N O N E X I S T E N C E O F EVEN FIBONACCI P S E U D O P R I M E S O F THE P T KIND*

MATH 145 Algebra, Solutions to Assignment 4

THE MODULAR CURVE X O (169) AND RATIONAL ISOGENY

All variables a, b, n, etc are integers unless otherwise stated. Each part of a problem is worth 5 points.

Fibonacci Pseudoprimes and their Place in Primality Testing

An Addition Theorem Modulo p

460 [Nov. u»=^tjf> v = <*"+?", (3)

D-MATH Algebra II FS18 Prof. Marc Burger. Solution 26. Cyclotomic extensions.

Equivalence of Pepin s and the Lucas-Lehmer Tests

ON THE LIMIT POINTS OF THE FRACTIONAL PARTS OF POWERS OF PISOT NUMBERS

1/30: Polynomials over Z/n.

ON VALUES OF CYCLOTOMIC POLYNOMIALS. V

PELL NUMBERS WHOSE EULER FUNCTION IS A PELL NUMBER. Bernadette Faye and Florian Luca

POLYGONAL-SIERPIŃSKI-RIESEL SEQUENCES WITH TERMS HAVING AT LEAST TWO DISTINCT PRIME DIVISORS

LEHMER S TOTIENT PROBLEM AND CARMICHAEL NUMBERS IN A PID

A METRIC RESULT CONCERNING THE APPROXIMATION OF REAL NUMBERS BY CONTINUED FRACTIONS 1. INTRODUCTION AND STATEMENT OF RESULTS

GENERALIZATIONS OF SOME ZERO-SUM THEOREMS. Sukumar Das Adhikari Harish-Chandra Research Institute, Chhatnag Road, Jhusi, Allahabad , INDIA

0 Sets and Induction. Sets

Journal of Combinatorics and Number Theory 1(2009), no. 1, ON SUMS OF PRIMES AND TRIANGULAR NUMBERS. Zhi-Wei Sun

Perfect Power Riesel Numbers

Some sophisticated congruences involving Fibonacci numbers

SYMMETRICOMPLETIONS AND PRODUCTS OF SYMMETRIC MATRICES

Future Self-Guides. E,.?, :0-..-.,0 Q., 5...q ',D5', 4,] 1-}., d-'.4.., _. ZoltAn Dbrnyei Introduction. u u rt 5,4) ,-,4, a. a aci,, u 4.

PROJECTIVE COVERING DESIGNS

1. I N T R O D U C T I O N. DeMoivre (1718) used the generating function (found by employing the recurrence) for the

Notes on Systems of Linear Congruences

Proof 1: Using only ch. 6 results. Since gcd(a, b) = 1, we have

Divisibility in the Fibonacci Numbers. Stefan Erickson Colorado College January 27, 2006

A NOTE ON THE DIOPHANTINE EQUATION a x b y =c

1. INTRODUCTION. Ll-5F 2 = 4(-l)" (1.1)

and A", where (1) p- 8/+ 1 = X2 + Y2 = C2 + 2D2, C = X=\ (mod4).

Colloq. Math. 145(2016), no. 1, ON SOME UNIVERSAL SUMS OF GENERALIZED POLYGONAL NUMBERS. 1. Introduction. x(x 1) (1.1) p m (x) = (m 2) + x.

Transcription:

ON SECOND-ORDER LINEAR RECURRENCE SEQUENCES: WALL AND WYLER REVISITED Hua-Chieh Li Dept. of Mathematics, National Tsing Hua University, Hsin Chu, 300, Taiwan, R.O.C. (Submitted March 1998-Final Revision April 1999) 1. INTRODUCTION Sequences of integers satisfying linear recurrence relations have been studied extensively since the time of Lucas [5], notable contributions being made by Carmichael [2], Lehmer [4], Ward [11], and more recently by many others. In this paper we obtain a unified theory of the structure of recurrence sequences by examining the ratios of recurrence sequences that satisfy the same recurrence relation. Results of previous authors usually derived from many complicated identities. Evidently, our method is simple and more conceptual. The method of using ratios modulo/? or over a finite ring has been used in several papers including [1], [3], [6], and [7] among several others. Many known results due to Lucas [5], Lehmer [4], Vinson [9], Wall [10], and Wyler [13] can be derived easily from the well-known method of utilizing ratios. However, our point of view is really different from that of previous authors, so that we obtain our main result (Theorem 3.6(iii)), which improves on a result of Wyler [13], and we also get new information (Corollary 4.3) concerning Wall's question [10]. 2. PRELIMINARIES AND CONVENTIONAL NOTATIONS Given a and b in the ring 2/1 with h a unit, we consider all the second-order linear recurrence sequences {u n } in 2/1 satisfying u n = au n _ l +bu n _ 2. (However, in this paper we exclude the case u n = 0 for all"wgz.) We call the sequence {u n } a second-order recurrence sequence with parameters (a, b). Our idea comes from the following observation: Let {u n } and {u' n } be a pair of sequences in 2/1 that satisfy the same recurrence relation defined above. Suppose that there exists a unit c in 2/1 such that u t = cu' t+s and u t+l = cu' t+s+l for some integers t and s. Then, since b e 27T, by the recurrence formula, we have that u n -cu' n+s for all n GZ. Recall that the two elements (x 0,X X ) and (y 0, y x ) in the projective space P*(2/l) are the same if x 0 = cy 0 and x x - cy x for some c e 2/1*. Hence, if we consider (u n, u n+l ) as in the projective space P 1 (2/l), then (u t, u t+l ) = (tif +s, Uf +s+l ) in P l (<3t) for some t implies (u n,u n+l ) = (u^+s,w^+1 ) in.p 1^) for all n. We have the following definition. Definition: Let {u n } be a second-order linear recurrence sequence defined over 2/1. Consider r n - (u m u n+l ) as an element in the projective space P 1 (2/l). We call r n the /1 th ratio of {u n } and we call the sequence {r n } the ratio sequence of {u n }. We say that two sequences {u n } and {u' n } which both satisfy the same recurrence relation are equivalent if there is c e 2ft* and an integer s such that u n+s - cu' s for all n. Let {r n } and {r w '} be the ratio sequences of {u n } and {u' n }, respectively. Then {u n } and {r n } are equivalent if and only if there exist integers s and / such that r s = r/ in P l (*3l). 342 [NOV.

ON SECOND-ORDER LINEAR RECURRENCE SEQUENCES! WALL AND WYLER REVISITED In pztrticular, suppose that u t = u t+s and u t+l = u t+s+x for some integers t and s. Then we have that u n =u n+s for all n. In this case, we say that {u n } is periodic and the least positive integer k such that u 0 = n k and u x =u k+l is called the period of {u n }.. When {u n } is periodic, the ratio sequence {r n } of {u n } is also periodic. The least positive integer z such that r 0 = r z in P l (Qk) is called the rank of {u n }. Suppose that the period of {u n } is k and the rank of {uj is z. It is clear that z AT andr^rj in P 1 ^ ) for all 1 < I > j < z. We remark that, If 2ft, Is a finite ring, then the linear recurrence sequence {u n } is periodic. 3, RECURRENCE SEQUENCE MODULO p In this section, we will extend our method to treat general second-order linear recurrence sequences. Results in Lucas [5], Lehmer [4], and Wyler [13] can be derived easily using our method. Fix a and b e Z. We consider second-order recurrence sequences of parameters (a, b). Thus, we consider the sequences of integers {w w }^=0 defined by u n = au n _ x +hu n _ 2 for all integers n > 2, where u 0 and u x are given integers. In the case in which u 0 = 0 and u x = 1, the sequence {tt }* =0 is called the generalized Fibonacci sequence and we denote its terms by f 0, f x,.... Fix a prime number p. We consider the recurrence sequence of parameters (a, b) modulo p. Suppose that p\b. Then it is easy to see that u n = a n ~ l u x (modp). Therefore, for the remainder of this section, we always assume that p\b and, hence, {u n } is periodic modulo/?. The positive integer z is called the rank of apparition of the generalized Fibonacci sequence modulo p if it is the smallest positive integer such that f z = 0 (mod p). Let /; =(f i,f i +i) in P l (l/pz) be the I th ratio of {/ } modulo p. Since r 0 = (0,1) = r z in P l (Z/pZ) and z is the least positive integer such that r z = (0,1) in P\Z/pZ), it is clear that the rank of apparition of the generalized Fibonacci sequence modulo p is equal to the rank of the generalized Fibonacci sequence modulo p. Given a sequence {u n } 9 there exists r ez such that {u n } modulo p is equivalent to the sequence {u' n } modulo p with «g = 1 and u[ = r. Therefore, without loss of generality, we only consider the sequence with u Q = 1 and u t = r. Lemma 3J Let {u n } be the recurrence sequence with parameters (a, b) and u 0 = 1, I/J = r. Then the rank of {u n } modulo p' equals the rank of {fj modulo p i if p\r 2 -ar~b. Proof: Suppose that the rank of {u n } modulo p i is t and the rank of {/ } modulo p j is z. Set u' = bf n _ x +rf n. We have that u f n=au f n_ x +bu' n _ 2 (mod p j ) and UQ = 1 and u[ = r (mod /?''). Thus, MjJ = i/ n (mod /? 7 ') for all n. Hence, M Z+1 = f/ z+1 = ru z (mod /7 1 ') because f z = 0 (mod /?'') and A/ z-1 = / z+1 (mod p j ). This says that (w z, i/ z+1 ) = (n 0, i/^ in P l (Z/p j I) and, hence, / z. On the other hand, we have that bf t +rf t+l =r(bf t _ x +rf t ) (mod p ; 'X by the assumption that u t+x =ru t (mod p j ). Substituting f t+l = af t +bf t _ l9 we have that (r 2 -ar~b)f t = 0 (mod p y )- Therefore, (r 2 - ar - ft, p) = 1 implies that f t = 0 (mod /;''). This says that z 11. D Remark: Suppose that r 2 -ar-b = 0 (mod/?) and {u n } is the sequence with parameters (a,z?) and i^ = l, u x =r. Then we can easily obtain u n = r n u 0 (mod/?). Hence, the rank of {u n } modulo pis 1. 1999] 343

ON SECOND-ORDER LINEAR RECURRENCE SEQUENCES! WALL AND WYLER REVISITED Proposition 3.2 (Lucas): Let z be the rank of the generalized Fibonacci sequence with parameters (a, b) modulo/?. Let D - a 2 +4b and denote (/) to be the Legendre symbol. Then (i) z\p + l,if(d/p) = -l. (ii) z /?-l,if(z)//?) = l. (Hi) z = p,ifp\d. Proof: (i) Suppose that {Dip) - - 1. Then x 2 -ax-b = 0 (mod/?) has no solution. Thus, by Lemma 3.1, every recurrence sequence with parameters (a, b) has the same rank modulo/?. Let t be the number of distinct equivalence classes of recurrence sequence of parameters (a, b) modulo p. Let {{u in } 11 < / < f} be a representative of these equivalence classes and {{r jn } 11 < / < *} be their ratio sequences in P l (Z/pI). By definition, we have that r is^r it in P l (Z/pZ) for all \<s^t<z and, if i *j, {r t n ) and {r jn } are disjoint. Since, for any r ep l (I/ pi), {u 0r u^) = r gives a sequence {u n }, we have that {r ll,...,r iz }<j>--kj{r hl,...,r tz } = P l (I/ pi). It follows that zt - p +1 because the number of elements in P l (ZIpi) is p +1. (ii) For (D/p) = l, there exist two distinct solutions to x 2 -ax-b = 0 (mod p). By the Remark following Lemma 3.1, these two solutions give us sequences of rank 1. Consider all the distinct equivalence classes of sequences that have the same rank as the Fibonacci sequence modulo p. As in the above argument, their ratio sequences form disjoint subsets of equal numbers of elements of l (Z/ pz). Since the number of these ratios is p +1-2, our claim follows. (Hi) Since, for p/d, there exists exactly one solution to x 2 -ax-b = 0 (mod/?), by the above argument, our claim follows. Remark: From the proof of Proposition 3.2, the number of distinct equivalence classes of recurrence sequences with parameters (a, b) that have the same rank z as the generalized Fibonacci sequence modulo p is (/? +1) / z (resp. (p -1) / z, 1) if (DIp) = -1 (resp. (DI/?) = 1, p \ D). Lemma 33: Let {u n } and {u' n } be two recurrence sequences with parameters (a, b). Then bu r u f s + u r+l u' +l = bu r+l u' s _ x + u r+2 u> s. Proof: By the recurrence formula, we have that bu r+l u f s_ x 4- u r+2 u> = u r+l (u' s+l - au' s ) + (au r+l + bu r )u' s = u r+l u f s+l + bu r u[. Let r = (a,b) and r f - (a\ b') be two elements in P l (Z/pZ) with a, a\ b, and b f ^ 0 (mod/?). Then we define r-r f - (aa f,bb f ) in P l {Z I pz). Let {r n } be the ratio sequence of the generalized Fibonacci sequence modulo/? and let z be the rank of the generalized Fibonacci sequence modulo /?. Since bf z _ 2 +af z _ { =f z = 0 (mod /?) and f y = 1, f 2 = a, we have that bfj z^_ x +/ +1 / z _ / s 0 (mod/?) by Lemma 3.3 and by induction. This says that / r z _ l -_ 1 = (1,-J) in P\Z/pi) for 1 < i < z - 2. Because ^ r 2 r z _ 2 = (/j, /^j) in P^Z /pi), we have the following Lemma. Lemma 3.4: Let {f n } be the generalized Fibonacci sequence with parameters (a, b) and let z be the rank of {f n } modulo/?. (i) Ifz is even, then / ^ = (-ft)(*- 2 > /2 (mod/?). fii) If z is odd, then / 2 _j = r(-ft) (z_3)/2 (mod/?), where r 2 = -6 (mod/?). 344 [NOV.

We remark that in Lemma 3.4(ii), r = / (z+1)/2 / f( z -iy 2 (mod/?). Since / z+1 = af z + bf z _ Y s bf z _J x (mod /?) and f z s 0 s ft/^ (mod /?), it follows that / +z = z-i/ w ( m od /?) for all fi and, hence, f n+az = (pf z _^xf n (mod /?). Suppose that {i/ n } is a recurrence sequence with parameters (a,b). Then, since u n = bu^f^+uj^ we also have that u n+z = %-i tt n (mod/?) for all w. Furthermore, suppose that {uj modulo/? is not equivalent to {f n } modulo p and suppose that {r n '} is the ratio sequence of {u n } modulo /?. Since u n # 0 (mod /?) (otherwise {u n } is equivalent to {/ }), it follows that r{-r{"-"r z ' = (u l9 u z+l ) in P l (Z/pi) and, by the above argument, (u l9 u z+l ) = (1, A/^) in P l (Z/pi). Now we consider the product of all the ratios of nonequivalent sequences modulo p with the exception of (/ z _ 1? f z ) and (/ z, / z + 1 ). By Proposition 3.2, we have the following: (i) If x 2 - ax - b = 0 (mod /?) is not solvable, then (l,rw z -i) (p+1)/z ) = a ( p - l )! ) = (l,-l) inp'cz/pz). Hence,(6/^1) (/M - 1)/ * = ^6(mod/>). (ii) If x 2 - ax - b = 0 (mod p) is solvable with a double root y, then Notice that y 2 - ~b (mod/?). a/ P -i)-(i,r) = (i,0>-i)d = 0,-i) inpv/^z). (iii) If x 2 - ax - b = 0 (mod /?) is solvable with two distinct solutions a and /?, then (1, b-\bf z _ x )^lz ) (1, a) (1, p) = (1, (/?-1)!) = (1, -1) in P^Z//?Z). Since a/3 = -A (mod/?), it follows that {hf z _ x ) {p - l)lz = 1 (mod/?). Notice that in (ii), since z = p is odd, by Lemma 3.4, f p -i = (-b) (p ~ 3)/2 r (mod/?), where r = /( z+1 )/ 2 / f{z-iyi ( m d Z 7 ) and r 2 = -6 (mod /?). We have that r = -y or r = y (mod /?). Since - I s / ^ = r p ~ 2 y (mod/?), it follows that y= -r (mod/?). Thus, -/ (/7+1) / 2 I f{ p -\)ii is. the double root to x 2 - or - 6 = 0 (mod/?). Using a similar argument, by considering (i) and (iii), we can improve the results in Proposition 3.2. Proposition 3.5 (Lehmer): Let z be the rank of the generalized Fibonacci sequence with parametrs (a, b) modulo/? and let D = a 2 +4b. Suppose that /? is an odd prime such that p\d. Then {-b //?) = 1 if and only if z ^». Proof: If z is odd, then, by Lemma 3.4(ii), we have that (~b/p) = l. Since /?-(/)//?) is even, we have that 2z\p-{DTp). Suppose that z is even. Then, by (i) and (iii) above, and by Lemma 3.4, we have that p-(d/p) p-\ (_1) T-(-4)T- = i (mod/?). Our proof is complete because (-b I p) = (-&) (/7 " 1)/2 (mod /?). D From Lemma 3.4, we realize that the relation between the period and the rank of {f n } modulo/? depends on the order of ~b modulo/?. Denote ord p (d) to be the least positive integer x such that d x = 1 (mod/?). We begin with the following easy observation. For n e N, w e have 1999] 345

It is also easy to check that ordjd) ord p (d") = P \\A\Y p gcd(rc, ord Jd)) ord p (d), -i otd p (d) = 0 (mod 4), ord J-d) = \ ±ord p (d), iford p (d)^2 (mod4), 2ord Jd), if ord Jd) = 1 (mod 2). p Furthermore, suppose that x 2 = d (mod/?) is solvable and suppose that X is one of its solutions. Then f2ord p (<f), i f o r d ^ ^ O (mod 2), r p^ ' " [2ord p (d) or otd p (d), iford p (d) = 1 (mod 2). We remark that, if {dip) = 1 and ord p (<f) is odd, then the order of one of the roots of x 2 = d (mod/?) is odd and the order of another root is even. Theorem 3.6: Let {f n } be the generalized Fibonacci sequence with parameters (a, b) and let z be the rank and k be the period of \f n } modulo p, respectively. Let z = 2 V and ord p (-b) - 2 M h, where z 9 and h are odd integers. (i) If v^//, then = 21cm[z, ord p (-A)]. (i# If v = // > 0, then k - lcm[z, ord^-i)]. (Hi) In the case v = /u = 0. f21cm[z, ord p (-b)l jlcmfz, ord p (-6)], if ord p (/ (z+1)/2 // (z _ 1)/2 ) is odd, if ord p (/ (2+1)/2 // (z. iy2 ) is even. Proof: First, we consider the case v > 0. Since z is even, by Lemma 3.4 and the discussion following Lemma 3.4, we have that k Iz = ord p (b{-bf z ~~ 2)l2 ) = ord p (-(-b) z/2 ). Suppose v > ju. Thenord p ((-b) z/2 ) = h/gcd(z',h) = l (mod 2). Hence,k/z = 2hIgcd(z',h). Therefore, = 2lcm[z, ord p (-6)]. On the other hand, suppose // = v. Then ord p ((-b) zf2 ) = 2h Igcd(z', h) = 2 (mod 4). Thus, k/z = hi gcd(z', h), and hence, A: = lcm[z, ovd p {-b)]. Similarly, suppose ju > v. Then ord p ((-b) z/2 ) = 2^~ v+l h I gcd(z', h) = 0 (mod 4). Therefore, k/z = 2^~ v+l h I gcd(z', h), and hence, k = 21cm[z, ord p (-h)]. Now we consider the case v = 0. Since z is odd, we have k /z = ord p (h(-h) (z ~ 3)/2 r), where r =/ (z+1)/2 // (z _ 1)/2 and r 2 = -b (mod /?). Hence, i / z ^ o r d ^ - r * ). Suppose /i > v. Then ord^(r) = 2ord p (-b); hence, ord p (r z ) = 2ord p (-Z>)/gcd(z,h) = 0 (mod 4). Therefore, Iz - 2ord /? (- )/gcd(z, A); hence, k = 21cm[z, ord p (-b)]. Finally, suppose ju = v = 0. Then either ord^r) = ord p (-b) or ord p (r) = 2ord p (-h). Suppose ord p (r) = ord p (-b) (that is, ord^r) is odd). Then ord p (r z ) = ord^-6) / gcd (z, h) = 1 (mod 2). Therefore, / z = 2ord /7 (-Z>) / gcd(z, h); hence, A: = 21cm[z, ord p (-b)]. On the other hand, suppose ord p (r) = 2ord p (-b) (that is, ord p (r) is even). Then ovd p (r z ) = 2ord p (~b) I gcd (z, h) = 2 (mod 4). Thus, A: / z = ord p (-Z>) / gcd(z, h) and hence, A: = lcm[z, ord p (-ft)]. D 346 [NOV.

Remark: Cases (i) and (ii) of Theorem 3.6 above are stated as Wyler's main theorem in [13]. However., our approach is different and Wyler does not settle the case in which both z and ord p (- ) are odd (that is, case (iii) of our theorem). 4. RECURRENCE SEQUENCE MODULO p t We now treat the case of the generalized Fibonacci sequence modulo p* for t > 2. Let us denote by z(p j ) the rank of {f n } modulo /?'. We begin with an easy observation: If {uj is equivalent to {/ } modulo p\ then the number of possible ratios of {uj modulo p 1+l is z(p') or pz(p t ). By Lemma 3.1, the rank of such a sequence modulo p t+l equals z(p t+l ). Therefore, the rank of z(p t+l ) divides pz(p f ). Since zip 1 ) \z(p t+l ), it follows that either z(p^)=z(p') or z(p^) = pz(p<). Theorem 4.1: The rank of apparition of the generalized Fibonacci sequence modulo p* equals the rank of apparition of the generalized Fibonacci sequence modulo p t+l if and only if there exists a sequence which is equivalent to {f n } modulo p t but is not equivalent to {/ } modulo p 1+l. Proof: {u n } is equivalent to {fj modulo p* if and only if (u l9 u^) = (f i9 f i+l ) in P l (Z/p'Z) for some /'. On the other hand, by the above argument, z(p t+l ) =z(p t ) if and only if there exists r e Z such that (l,r) = (f i9 f M ) in P\Z/p?Z) for some / but (l,r)*(f j9 f J+l ) in P l (Z/p t+l Z) for all j E Z. Combining these two statements, our proof is complete. D?'. We remark that {u n } is equivalent to {/ } modulo p* if and only if u i = 0 (mod p l ) for some Example: Consider the Fibonacci sequence and the Lucas sequence {F n }f - {1,1,2,3,5,0,5,5,2,7,1,0,1,1,...} (mod 8) {ZX ^ {1,3,4,7,3,2,5,7,4,3,7,2,1,3,...} (mod 8). The rank of apparition of the Fibonacci sequence modulo 2, 4, and 8 is 3, 6, and 6, respectively. We have that {L n } is equivalent to {FJ modulo 4 because L, = 0 (mod 4) but {LJ is not equivalent to {FJ modulo 8 because L n 4 0 (mod 8) for all n. For every t GM,WQ denote k(p f ) to be the period of {/ } modulo p l. By considering the "Binet form" of {/ }, Lehmer [4] proves that, for p * 2, if k(p l ) = k(p) but k(p l+l ) * kip), then k(pt) - p l " l k{p) for all t > I. Let z(p') denote the rank of apparition of {/ } modulo p t. By a similar method, we can prove that, for p*2, if z(p l )=z(p) but z(p l+l )*z(p) 9 then z(p') = p*~ l z(p) for all / > /. We note that this result was also proved by Lucas [5] and by Carmichael [2]. We remark that z(p M ) *z(p l ) implies k(p l+l ) * k(p l ), but the converse is not always true. Corollary 4.2: Let {/ } be the generalized Fibonacci sequence with parameters (a, b). Let/? be an odd prime and, for every t e N, denote zip 1 ) to be the rank of {fj modulo p l. Suppose that 1999] 347

z(p l ) *z(p l+l ). If {// } is a recurrence sequence with parameters (a, b) such that u { = 0 (mod./? 7 ) for some /, then, for every t > /, there exists j t such that Uj = 0 (mod /?') Proof: z(p l )*z(p l+l ) implies zip') * z(p t+l ) for all t > I. Therefore, according to Theorem 4.1, every sequence that is equivalent to {/ } modulo p l is also equivalent to {/ } modulo p t for all r > /. D Now we restrict ourselves to considering only the Fibonacci sequence {F n }. For every t e N, we denote Kip') to be the period of {F n } modulo p'. In [10], Wall asked whether K(p) = K(p 2 ) is always impossible; until this day, it remains an open question. According to Williams [12], K(p) & K(p 2 ) for every odd prime/? less than 10 9. Z.-H. Sun and Z.-W. Sun [8] proved that the affirmative answer to Wall's question implies the first case of Fermat's last theorem. Let Zip 1 ) denote the rank of apparition of the Fibonacci sequence modulo p' for every t GN. We have that, for p *2, Kip') = Kip' +l ) if and only if Zip') = Z(/? f+1 ). What makes Theorem 4.1 so interesting is the following Corollary. Corollary 43: Let/? be an odd prime and, for every t GM, denote Kip') to be the period of {F n } modulo /?'. Suppose that Kip 1 ) * K(j> l+l ). Let {u n } be a sequence satisfying the same recurrence relation as {F n } such that u i =0 (mod p l ) for some /'. Then, for every t>l, there exists j t such that u Jt = 0 (mod p'). Remark: In particular, let/? be an odd prime such that Kip) & Kip 2 ). Suppose that {u n } is a recurrence sequence with parameters (1,1) and u t =0 (mod/?) for some'/. Then Corollary 4.3 implies that, for every positive integer /, there exists j t such that u jt = 0 (mod p'). This is true for /? < 10 9 according to Williams [12]. Unlike the Fibonacci case, we have examples for which k(j?) - kip 2 ) and zip) ^ zip 2 ). Example: Let a - 8 and b = - 7. Then {/X=o s {0,1,3,2,0,1,...} (mod 5) and {/X=o - {0,1,8, 7,0,1,...} (mod 25). Consider the sequence {u n } with u 0 = 5, and ^ = 1 which satisfies u n - Su^-lu^. We have that {uj^o - {0,1,3,2,0,1,...} (mod 5) and {u n } =0 s {5,1,23,2,5,1,...} (mod 25). One might ask for what kind of parameters (a, 5) the generalized Fibonacci sequence has kip) = kip 2 ), and whether or not k(p) = i(/? 2 ) for infinitely many primes. From our construction above, we understand that this question is related to: "For a given integer x, does there exist a prime/? such that ord /7 (x) = ord 2(^)?!S and "Are there infinitely many primesp such that, for a given integer x, ord p (x) = ord /?2 (x)? fl. Of course, we can suppose that fix) = x 2 -ax-b is irreducible over the integers. Then we have to consider our question over the ring of integers of Q[^a 2 +4bj. We have not taken up in this paper the question of whether a given recurrence {u n } has zeros modulo a given integer m or not. Ward [11] has shown that {u n } has zeros modulo p for infinitely many primes p. For given parameters (a, h), suppose that we know there are only finitely many primes such that z(p) =z(/? 2 ). Then, by Corollary 4.2, it follows that there exist infinitely many primes/? such that {uj has zeros modulo p { for every t e N. 348 [NOV.

ACKNOWLEDGMENT The author would like to express his appreciation to the anonymous referee for making valuable suggestions regarding the presentation of this paper. REFERENCES 1. G. Bruckner. "Fibonacci Sequence Modulo a Prime p = 3 (mod 4)." The Fibonacci Quarterly 8.3 (1970):217-20. 2. R..D. Carmichael. "On the Numerical Factors of the Arithmetic Forms a n ±p ri " Ann. of Math. 15 (1913):30-70. 3. P. Catlin. "On the Divisors of Second-Order Recurrences." The Fibonacci Quarterly 12.2 (1974): 175-78. 4. D.Lehmer. "An Extended Theory of Lucas'Functions." Ann. of Math. 31 (l930):4l9-4%. 5. E. Lucas. "Theorie des fonctions numeriques implement periodiques." Amer. J. Math. 1 (1878): 184-240, 289-321. 6. L. Somer. "The Fibonacci Ratios F k+1 /F k Modulo/?." The Fibonacci Quarterly 13.4 (1975): 322-24. 7. L. Somer. "Primes Having an Incomplete System of Residues for a Class of Second-Order Recurrences." In Applications of Fibonacci Numbers 2:113-41. Ed. A. N. Philippou, A. F. Horadam, & G. E. Bergum. Dordrecht: Kluwer, 1988. 8. Z.-H. Sun & Z.-W. Sun. "Fibonacci Numbers and Fermat's Last Theorem." Acta Arith. 60 (1992):371-88. 9. J. Vinson. "The Relation of the Period Modulo m to the Rank of Apparition of m in the Fibonacci Sequence." The Fibonacci Quarterly 1.1 (1963):37-45. 10. D. D. Wall. "Fibonacci Series Modulo m." Amer. Math. Monthly 67 (1960:525-32. 11. M. Ward. "Prime Divisors of Second-Order Recurrences." Duke Math. J. 21 (1954):607-14. 12. H. C. Williams. "A Note on the Fibonacci Quotient F p _ e lp." Canadian Math. Bull. 25 (1982):366-70. 13. O. Wyler. "On Second-Order Recurrences." Amer. Math. Monthly 72 (1965):500-06. AMS Classification Numbers: 11B39, 11A07, 11B50 1999] 349