133 78 13MB
English Pages xviii; 301 [312] Year 2023
CMS/CAIMS Books in Mathematics
Christian J.-C. Ballot Hugh C. Williams
Canadian Mathematical Society Société mathématique du Canada
The Lucas Sequences Theory and Applications
CMS/CAIMS Books in Mathematics Volume 8
Series Editors Karl Dilcher, Department of Mathematics and Statistics, Dalhousie University, Halifax, NS, Canada Frithjof Lutscher, Department of Mathematics, University of Ottawa, Ottawa, ON, Canada Nilima Nigam, Department of Mathematics, Simon Fraser University, Burnaby, BC, Canada Keith Taylor, Department of Mathematics and Statistics, Dalhousie University, Halifax, NS, Canada Associate Editors Ben Adcock, Department of Mathematics, Simon Fraser University, Burnaby, BC, Canada Martin Barlow, University of British Columbia, Vancouver, BC, Canada Heinz H. Bauschke, University of British Columbia, Kelowna, BC, Canada Matt Davison, Department of Statistical and Actuarial Science, Western University, London, ON, Canada Leah Keshet, Department of Mathematics, University of British Columbia, Vancouver, BC, Canada Niky Kamran, Department of Mathematics and Statistics, McGill University, Montreal, QC, Canada Mikhail Kotchetov, Memorial University of Newfoundland, St. John’s, Canada Raymond J. Spiteri, Department of Computer Science, University of Saskatchewan, Saskatoon, SK, Canada
CMS/CAIMS Books in Mathematics is a collection of monographs and graduatelevel textbooks published in cooperation jointly with the Canadian Mathematical Society- Soci´et´e math´ematique du Canada and the Canadian Applied and Industrial Mathematics Society-Soci´et´e Canadienne de Math´ematiques Appliqu´ees et Industrielles. This series offers authors the joint advantage of publishing with two major mathematical societies and with a leading academic publishing company. The series is edited by Karl Dilcher, Frithjof Lutscher, Nilima Nigam, and Keith Taylor. The series publishes high-impact works across the breadth of mathematics and its applications. Books in this series will appeal to all mathematicians, students and established researchers. The series replaces the CMS Books in Mathematics series that successfully published over 45 volumes in 20 years.
CMS SMC
Christian J.-C. Ballot • Hugh C. Williams
The Lucas Sequences Theory and Applications
Christian J.-C. Ballot D´epartement de Math´ematiques & Informatique Universit´e de Caen Normandie Caen, France
Hugh C. Williams Department of Mathematics & Statistics University of Calgary Calgary, AB, Canada
ISSN 2730-650X ISSN 2730-6518 (electronic) CMS/CAIMS Books in Mathematics ISBN 978-3-031-37237-7 ISBN 978-3-031-37238-4 (eBook) https://doi.org/10.1007/978-3-031-37238-4 Mathematics Subject Classification: 11B39, 11-02, 11A51, 11B05, 11B37 © Springer Nature Switzerland AG 2023 This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed. The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use. The publisher, the authors, and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors give a warranty, expressed or implied, with respect to the material contained herein or for any errors or omissions that may have been made. The publisher remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. This Springer imprint is published by the registered company Springer Nature Switzerland AG The registered company address is: Gewerbestrasse 11, 6330 Cham, Switzerland Paper in this product is recyclable.
Dedicated to the memory of John Brillhart (1930–2022), teacher, mentor, friend.
Preface
This book began during a visit of the first author to the second in Calgary in July of 2013. We had both considered separately the possibility of writing a book about the Lucas sequences, but during this visit, we agreed to collaborate on such a project; we also agreed that we were far too busy to begin until several years into the future. The next occasion when we were able to meet was the 18th Conference of the Fibonacci Association in July, 2018, at Halifax, Canada. It was during this meeting that work on this book began in earnest. While we had hoped to complete this undertaking in about 3 years, many obstacles to our progress, not the least of which was the COVID-19 pandemic, prevented its completion until now. We explain the rationale for this book in the introductory chapter, so we will only mention here that it is the result of a blending of the diverse interests of the authors in various aspects of the Lucas sequences; as such it is a somewhat unusual volume, but we hope it will provide its readers with a good introduction and a sense of the direction of research in this topic. For those readers who wish to delve more deeply into the subject matter, we have attempted to provide a thorough bibliography at the end of each chapter. Unfortunately, it is very possible that we, through inadvertence or ignorance, may not have cited some important contributions; we can only offer our apologies to our readers and the affected authors. We both have a great interest in the history of mathematics and hope that our readers will forgive our frequent excursions into this area. For those who also appreciate history, we have included an appendix which discusses ´ Edouard Lucas, his times and his work. If he is known at all today, it is usually through his contributions to recreational mathematics, but we hope that this production will illustrate his achievements in other mathematical endeavors, particularly computational number theory. The origin of Prof. Williams’ interest in the Lucas sequences developed from a course in number theory given by Dr. T. M. K. Davison at the University of Waterloo in 1966, while that of Prof. Ballot came from his thesis vii
viii
Preface
work (1990–92) which originated from the study of the 1985 paper of J. Lagarias on the prime divisors of the Lucas numbers. Thus, we have each devoted a substantial portion of our academic careers to their study, an activity which has brought us enormous intellectual and personal satisfaction. It is our hope that the readers of this work will share in our delight in the wonderful properties of these remarkable mathematical objects. Caen, France Ottawa, ON, Canada January, 2023
Christian J.-C. Ballot Hugh C. Williams
Acknowledgments
Ordinarily, one would expect in this section a list of several names of individuals who have contributed ideas or advice in the creation of this book, but the recent pandemic prevented our attending the professional meetings where we could have discussed this project with knowledgeable experts. However, we were certainly able to use the Internet to acquire many informative publications, and we are most grateful to the authors of these works; their names appear in the bibliographies. We do wish to thank Andreas Hinz for informing us of the deplorable state of Lucas’ grave (with photos) and Andrew Granville for many insightful emails concerning linear division (divisibility) sequences. We are most grateful to Michael Somos, who generously offered to proofread an earlier version of this book. We also wish to acknowledge the valuable advice of three anonymous reviewers selected by the publisher. Their efforts have resulted in a much improved text. However, it seems inevitable in a work such as this that, in spite of our efforts to eliminate them, some errors or other infelicities will remain. They are the sole responsibility of the authors. We also point out the willingness of Samuel Hambleton and Jean-Marie De Koninck who shared via emails some of their experience on writing a book in LaTeX, and that of Davy Gigan who directs the computer systems at the University of Caen for his brief but efficient help with some LaTeX issues. Of course, we also thank Suresh Kumar from the Tex-support team at Springer for his patience and polite competent replies. We also wish to thank Donna Chernyk, Senior Editor (Mathematics) at Springer Science+Business Media, for her assistance in guiding us through the publication process, encouraging our efforts, and for her understanding of several missed deadlines on our part. Universit´e de Caen University of Calgary April, 2023
Christian J.-C. Ballot Hugh C. Williams ix
Contents
List of Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv 1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1 9
2
Basic Theory of the Lucas Sequences . . . . . . . . . . . . . . . . . . . . . 2.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Most Common Identities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3 General Divisibility Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4 Divisibility of Un by Powers of an Odd Prime . . . . . . . . . . . . . . 2.5 Divisibility of Un by Powers of 2 . . . . . . . . . . . . . . . . . . . . . . . . . . 2.6 Composite Integers Dividing U and Their Rank . . . . . . . . . . . . 2.7 Divisibility of Vn by Powers of an Odd Prime . . . . . . . . . . . . . . 2.8 Divisibility of Vn by Powers of 2 . . . . . . . . . . . . . . . . . . . . . . . . . . 2.9 Composite Integers Dividing V . . . . . . . . . . . . . . . . . . . . . . . . . . 2.10 Euler’s Criterion for Lucas Sequences . . . . . . . . . . . . . . . . . . . . . 2.11 Degenerate Lucas Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.12 Divisibility by Powers of a Special Prime . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11 11 14 22 27 31 34 35 38 39 42 43 45 51
3
Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1 Mersenne Primes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 Primality Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3 Fast Computation of Un and Vn (mod m) . . . . . . . . . . . . . . . . . 3.4 Solving Quadratic and Cubic Congruences . . . . . . . . . . . . . . . . . 3.5 Integer Factoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.6 Diophantine Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.7 Cryptography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
53 53 58 63 65 69 71 72 74
xi
xii
Contents
4
Further Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1 Connection with the Circular Functions . . . . . . . . . . . . . . . . . . . 4.2 The Chebyshev and Dickson Polynomials . . . . . . . . . . . . . . . . . . 4.3 Additional Arithmetic Properties . . . . . . . . . . . . . . . . . . . . . . . . . 4.4 The Lehmer Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.5 The Primitive Divisor Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . 4.6 Moduli with a Full Set of Residues . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
79 79 81 86 91 93 98 102
5
Some Properties of Lucasnomials . . . . . . . . . . . . . . . . . . . . . . . . . 105 5.1 Definition. Connection with q-Binomial Coefficients . . . . . . . . . 105 5.2 Integrality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 5.3 Ten Basic Identities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 5.4 Combinatorial Interpretations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 5.4.1 Square-and-Domino-Tiling Interpretations . . . . . . . . . . . 118 5.4.2 An Interpretation Coming from q-Binomial Coefficients 123 5.5 Lucasnomial Catalan Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 5.5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 5.5.2 Definition and Integrality . . . . . . . . . . . . . . . . . . . . . . . . . . 127 5.5.3 Interpretation of Lucasnomial Catalan Numbers . . . . . . 130 5.5.4 The Search for Catalan-Like Triples . . . . . . . . . . . . . . . . 131 5.6 The p-Adic Valuation of Lucasnomials . . . . . . . . . . . . . . . . . . . . 133 5.6.1 A Generalized Kummer Rule . . . . . . . . . . . . . . . . . . . . . . 133 5.6.2 A Generalized Legendre Formula . . . . . . . . . . . . . . . . . . . 137 5.6.3 Explicit Valuations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 5.7 Lucas’ Congruence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 5.8 Wolstenholme’s Congruence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 5.9 A Word on Lehmernomials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
6
Cubic Extensions of the Lucas Sequences . . . . . . . . . . . . . . . . . 6.1 Lucas’ Attempts to Generalize His Sequences . . . . . . . . . . . . . . 6.2 Cubic Linear Recurrences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.3 Bell’s Contribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.4 The Cubic Pell Equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.5 Williams’s Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.6 Roettger’s Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
165 165 171 173 174 175 177 179
7
Linear Recurrence Sequences and Further Generalizations 7.1 Linear Recurrence Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.2 Impulse Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.3 A Return to the Lehmer Sequences . . . . . . . . . . . . . . . . . . . . . . . 7.4 Primality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
183 183 187 190 192 197
Contents
xiii
8
Divisibility Sequences and Further Generalizations . . . . . . . 8.1 Another Suggestion of Lucas for Generalizing His Sequences . 8.2 Elliptic Divisibility Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.3 Linear Divisibility Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.4 Extended Lucas Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.5 Odd and Even Extensions of the Lucas Sequences . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
199 199 201 204 208 212 216
9
Prime Density of Companion Lucas Sequences . . . . . . . . . . . . 9.1 How Do We Measure the Size of a Set of Primes? . . . . . . . . . . . 9.2 The Classic Density Theorems . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.3 Polynomial Modulo p and Cebotarev . . . . . . . . . . . . . . . . . . . . . . 9.4 Initial Inquiries of Sierpi´ nski, Brauer, and Ward . . . . . . . . . . . . 9.5 The Hasse-Lagarias Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.6 A Heuristic View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.7 The Laxton Group and Its Generalizations . . . . . . . . . . . . . . . . 9.7.1 The Laxton Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.7.2 Generalizations of the Laxton Group . . . . . . . . . . . . . . . . 9.8 The Density of Maximal Prime Divisors . . . . . . . . . . . . . . . . . . . 9.9 Irreducible Polynomials Dividing (X n + 1) . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
219 220 223 228 234 237 242 245 245 251 254 259 262
10 Epilogue and Open Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.1 Epilogue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.2 Some Unsolved Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
267 267 269 277
Appendix: A Short Biography of Lucas . . . . . . . . . . . . . . . . . . . . . . . 279 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289 Subject Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293 Name Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
List of Symbols
We present below, in the order in which they appear in the book, several of the most frequently used symbols and the page numbers where they first appear. The reader is cautioned that the same symbol may occasionally be used for two different objects; in these cases, the meaning of the symbol should be clear from context. We first mention that, as is customary, we use .N, .Z, .Q, .R, .C, and .Fq to respectively denote the natural, integer, rational, real and complex numbers, and the finite field of q elements. We also use .gcd(a, b) to denote the greatest common divisor of the integers a and b, .lcm(a, b) to denote the least common multiple of a and b, and .x to represent the floor of the real number x, i.e., the largest integer .≤ x. The fractional part of x is denoted by .{x} = x−x. Furthermore, we use .ϕ for Euler’s totient function.
(Xn ), .(Xn )n≥0 , X: an ordered sequence of integers: .X0 , X1 , . . . , Xn , . . ., page 1 Fn : the nth Fibonacci number (.F0 = 0, .F1 = 1), page 1 .Ln : the nth Lucas number (.L0 = 2, .L1 = 1), page 2 .α, .β: the zeros of the characteristic polynomial .f (x) = x2 − P x + Q, page 3 .δ: the value of .α − β, page 3 n n .(Un ), .(Vn ): the Lucas sequences, given by .Un = (α − β )/(α − β) and n n .Vn = α + β , page 3 .a | b: the integer a divides the integer b, page 12 .νp (r): the p-adic valuation of the rational number r, page 12 ν .p ||n: the prime power .pν exactly divides the integer n, page 12 .m ∼p n, .m ∼ n (base p): the integers m and n have the same p-adic valuation, page 12 .[−]: the Iverson symbol, page 12 .Un = Un (P, Q), .Vn = Vn (P, Q): the Lucas functions, page 12 D: the discriminant of the characteristic polynomial .x2 −P x+Q, page 13 .Ψn (P, Q): polynomial in P and Q associated with .Un , page 19 . .
xv
xvi
List of Symbols
ρ(m), .ρU (m): the rank of appearance of the integer m in the Lucas sequence U , page 26 . p , . n : respectively, the value of the Legendre symbol .(D | p) for a given prime p and the value of the Jacobi symbol .(D | n) for a given odd integer n, page 27 .(Pn ): the Pell sequence, page 35 .σ(m), .σV (m): the rank of appearance of the integer m in the Lucas sequence V , page 36 .ζ, .ζn : primitive nth root of unity, page 44 .s(n): the sum of the aliquot divisors of the integer n, page 53 .Mn : the Mersenne number .2n − 1, page 54 .Gm (x): the mth Sylvester polynomial, page 64 .ηp , .η: the value of the Legendre symbol .(Q | p) for a given prime p, page 68 .Φk (x): the kth cyclotomic polynomial, page 70 .Tn (x), .Un (x): respectively, the nth Chebyshev polynomials of the first and second kinds, page 82 .Cn (x), .Sn (x): modified nth Chebyshev polynomials of the first and second kinds, respectively, page 83 .Dn (x, a), .En (x, a): the nth Dickson polynomials of the first and second kinds, respectively, page 85 .ϕU (n): Lucas’ extension of the Euler .ϕ function, page 87 .μ(n): the M¨obius function, page 88 .Qn , .Qn (α, β): cyclotomic numbers associated with .Un (P, Q), page 89 ¯ = (U ¯n (R, Q), .V¯n (R, Q)): the Lehmer sequences, page 91 .U ¯ , page 92 .ω(m): the rank of appearance of the integer m in .U .(n): the square-free kernel of n, page 94 sqf n . : Lucasnomial or Lucasnomial coefficient, page 105 nk U . : Fibonomial or Fibonomial coefficient, page 105 nk F . : the q-binomial coefficient, page 106 nk q . : generalized binomial coefficient, page 107 nk X . : generalized binomial coefficient with respect to the sequence of polyk Ψ nomials .(Ψn ), page 108 .Tn : set of tilings of an .1 × n board with squares and dominos, page 118 .Cn : the nth Catalan number, page 125 .Ca,r (n): the nth generalized Fuss-Catalan number, page 126 .CU,a,r (n): the nth generalized Lucasnomial Fuss-Catalan number, page 127 .CU,a (n): the nth Lucasnomial Fuss-Catalan number, page 127 .CU (n): the nth Lucasnomial Catalan number with respect to U , page 127 .cq (n): the nth Carlitz q-Catalan number, page 128 .Cq (n): the nth MacMahon q-Catalan number, page 129 .Wn : set of binary words of length 2n with at most as many 1’s as 0’s in any prefix, page 129 maj(w): the major index of the binary word w, page 129 m!.U : .Um Um−1 · · · U1 , the factorial of m with respect to U , page 135 .
List of Symbols
xvii
[xt ]f (x): coefficient of .xt in the polynomial .f (x), page 142 .M (p): the multiplier of the prime p with respect to a Lucas sequence U , page 149 n . : Lehmernomial or Lehmernomial coefficient, page 158 ¯ k U .(xn ), .(yn ), .(zn ): Bell’s sequences, page 173 .ρi (.i = 1, 2, . . . , k): the k zeros of .f (x), page 174 .(Xn ): any integer sequence which satisfies the kth order linear recurrence .
Xn+k = P1 Xn+k−1 − P2 Xn+k−2 + · · · + (−1)k−1 Pk Xn ,
.
where .P1 , .P2 , . . . , .Pk are given fixed integers and .T0 = (X0 , X1 , . . . , Xk−1 ) is a fixed initial vector of k integer values, page 184 .(Zi,n ): the above .(Xn ) for each .i = 0, 1, 2, . . . , k − 1, and .Zi,j = δi,j , (.0 ≤ i, j < k), where .δi,j = 0 when .i = j and .δi,i = 1, page 174 .(Wn ), .(Vn ), .(Un ), .(Rn ), .(Sn ), .(Tn ): Williams’s sequences, page 176 .(Wn ), .(Un ): Roettger’s sequences, page 178 .f (x): the characteristic polynomial of .(Xn ), page 184 .τ (m): the minimal period length of the above .(Xn ) modulo the integer m, page 184 .(Zn ): the above .(Xn ) with .T0 = (0, 0, 0, . . . , 0, 1), i.e., .Zn = Zk−1,n , page 185 .π(m): the minimal period length of .(Zn ) modulo the integer m, page 185 .Δ: the discriminant of .f (x), page 187 .αi , .βi (.i = 1, . . . , k): the values satisfying .αi + βi = ρi , .αi βi = Q, page 190 .(Ui,n ), .(Vi,n ), (.i = 0, 1, 2, . . . , k − 1): the generalized Lehmer sequences, page 190 .F (x): the characteristic polynomial of the generalized Lehmer sequences, page 191 D: the discriminant of .F (x), page 191 .An , .Cn : .An = gcd(U0,n , U1,n , . . . , Uk−1,n ) and, when .k > 1, .Cn = gcd(V1,n , .V2,n , . . . , Vk−1,n ), page 192 .(Wn ): Ward’s elliptic divisibility sequence, page 202 .(Δn ), .(Sn ): Pierce’s sequences, page 209 .(Un ), .(Vn ): generalizations of Pierce’s sequences, page 209 .(Xn ): an integer sequence with characteristic polynomial .F (x). If .X−n = Q−n Xn for all integral n, .(Xn ) is said to be even; if .X−n = −Q−n Xn for all integral n, .(Xn ) is said to be odd, page 212 .(pn )n≥1 : the ordered sequence of all (rational) prime numbers with .p1 = 2 < p2 = 3 < . . ., page 220 .P: the set of all rational primes, page 220 .d = d(S): the natural density of a set of primes .S ⊂ P, page 221 .δ(S): the logarithmic density of a set of primes S, page 222 .OK : the ring of algebraic integers in a number field K, page 224 .f = f (P | p): the inertial degree of a prime ideal P over the rational prime p, page 225 .D = D(Q | P ): the decomposition group of Q over P , page 225 .
xviii
List of Symbols
Φ = Φ(Q | P ): the Frobenius automorphism relative to P and Q, page 226 Cp (K/Q): the conjugacy class of .Φ(P | p), P prime ideal above p in .OK , page 226 .mα (x): the minimal polynomial of the algebraic integer .α, page 227 .di : the density of primes p for which .f (x) admits exactly i zeros modulo p, page 230 .F (g): In the action of a group G on a set X, the number of points .x ∈ X such that .g · x = x, (.g ∈ G), page 231 .Zi : subset of the elements of the Galois group of .f (x) which fix exactly i zeros of .f (x), page 231 S: the Stephens constant, page 242 .F (f ): semigroup structure on the set of linear recurrences with the same characteristic polynomial f of degree 2, page 245 .G(f ): the Laxton group derived from .F (f ), page 245 .T (f ): the torsion subgroup of .G(f ), page 246 .ρmax (p): rank of maximal division of the prime p with respect to some fundamental recurrence U of order .m ≥ 2, page 252 .Cn : the nth Cullen number .n2n + 1, page 253 .Cf (n): the nth generalized Cullen number, page 253 . .
Chapter 1
Introduction
The secret of getting ahead is getting started.
(Mark Twain)
In his youth Albert Einstein spent a year loafing aimlessly. You don’t get anywhere by not ‘wasting time.’ (Carlo Rovelli)
As this is a book about number sequences, we begin by defining a number sequence to be an ordered set of numbers. We will often use the notation .(Xn ) or sometimes simply X to denote the sequence .X0 , X1 , X2 , . . . , Xn , . . . This will be convenient because we will be dealing with recurrence sequences whose elements are related to the previous elements in a clear-cut way. To define such a sequence, we require a rule, called a recurrence relation, to construct each element in terms of the ones before it. Furthermore, enough initial elements must be given so that all subsequent elements of the sequence can be computed by successive applications of the recurrence relation. For example, consider the Fibonacci numbers. These numbers are defined by the initial elements .F0 = 0 and .F1 = 1 and the recursion formula .Fn+1 = Fn + Fn−1 , for .n ≥ 1. The sequence is thus .0, 1, 1, 2, 3, 5, 8, 13, 21, . . . However, since .Fn−1 = Fn+1 − Fn , we can compute n .F−1 = −1, F−2 = 1, F−3 = −2, . . . , F−n = (−1) Fn . Thus, the complete Fibonacci sequence is .
. . . 21, −13, 8, −5, 3, −2, 1, −1, 0, 1, 1, 2, 3, 5, 8, 13, 21, . . .
Since many of the sequences that we will discuss can be extended in this way, we will occasionally use the notation .(Xn ) to represent the full sequence .
. . . , X−n , . . . , X−2 , X−1 , X0 , X1 , X2 , . . . , Xn , . . . .
It should be clear from the context which sequence is meant.
© Springer Nature Switzerland AG 2023
C. J.-C. Ballot, H. C. Williams, The Lucas Sequences, CMS/CAIMS Books in Mathematics 8, https://doi.org/10.1007/978-3-031-37238-4 1
1
2
1 Introduction
Perhaps as early as 1202, the Fibonacci numbers were presented by Leonardo Bonacci in his Liber Abbaci (Book of Calculation)† , as the solution of a problem of computing the number of rabbits that would result at time n under a particular breeding model. Certainly, we know that they appeared in the 1228 edition of this book. Leonardo (c. 1170–c. 1240–1250), a thirteenth-century Pisan mathematician, was known by other names such as Leonardo Pisano and Leonardo Bigollo (Pisano), but he is best known today as Fibonacci, a contraction of filius Bonacci (son of Bonacci), invented by the French historian Guillaume Libri in 1838. (See Devlin [5] for more details concerning what little is known about Fibonacci.) We emphasize here that Fibonacci was not the first to discuss these numbers; they were known much earlier to Indian mathematicians. (See Singh [25].) Because of their intrinsic interest and their many applications, the Fibonacci numbers have been the object of a considerable body of research; indeed, an entire journal, the Fibonacci Quarterly, established in 1963, is devoted to the study of their many properties and those of recurrence sequences in general. In addition, we mention the books of Gilson [8], Koshy [11], Posamentier and Lehman [22], and Vajda [27], each of which is dedicated to the study of the Fibonacci and Lucas numbers. The sequence of Lucas numbers .(Ln ) satisfies the same recurrence relation as the Fibonacci numbers, but with initial terms .L0 = 2 and .L1 = 1.‡ The sequences .(Fn ) and .(Ln ) possess a variety of properties, many of which can be found in the encyclopedic [11]. We mention here that .(Ln ) has even found an application in dynamical systems. See Puri and Ward [23], where it is shown that the only recurrence sequence satisfying the Fibonacci recurrence and realizable as the number of periodic points of a map must be a multiple of .(Ln ). A very notable feature of the Fibonacci numbers is the number of algebraic identities that they satisfy. For example, consider the identity discovered in 1680 by G. D. Cassini [11, pp. 85–86, 106, 114]: Fn2 − Fn+1 Fn−1 = (−1)n−1 ;
.
this is a special case of the identity of Catalan 2 Fn2 − Fn+m Fn−m = (−1)n−m Fm ,
.
which in turn is a special case of Vajda’s [27, (20a)] identity: Fn Fn+i−j − Fn+i Fn−j = (−1)n−j Fi Fj .
.
A yet more general and more symmetric form can be found in Johnson [10]: † The Liber Abbaci was first published in 1202, but no copies of this version of the book have survived. Several copies of the second 1228 edition, however, are extant. (See [5].) ‡ The term “Lucas numbers” for the numbers .2, 1, 3, 4, 7, 11, . . . seems to have become more and more common in the mid-1960s in papers published in the Fibonacci Quarterly.
1 Introduction
3
Fa Fb − Fc Fd = (−1)r (Fa−r Fb−r − Fc−r Fd−r ),
.
as long as .a + b = c + d. Put .a = n, .b = n + i − j, .c = n + i, .d = n − j, and r = n − j to obtain Vajda’s identity. As can be seen in [11], there are many, many more identities involving the .(Fn ) and .(Ln ) sequences. By computing a table of the Fibonacci numbers and their corresponding prime divisors, Lucas was able to discover empirically several characteristics of these factors [28, Sect. 3.1], which he was later able to prove in [16]. Indeed, it is now known that the Fibonacci numbers possess a large number and variety of fascinating number-theoretic properties. In 1844, Gabriel Lam´e [12], in his quest to bound the number of divisions needed in executing the Euclidean algorithm for determining the greatest common divisor of two integers, rediscovered the Fibonacci numbers. Up to 1876, the Fibonacci sequence was known to Lucas as the Lam´e sequence (or the Lam´e series). In January of 1876, Lucas [14] published a most remarkable short paper (actually, an extended abstract), in which he determined the possible linear forms of primes which divide certain elements of the Lam´e (Fibonacci) sequence, the Lucas numbers, originally defined as .F2n /Fn and denoted now by .Ln . He mentioned the identities .Ln+1 = Ln + Ln−1 and 2 n .L2n = Ln − 2(−1) and concluded the paper with the following (at that time) astonishing statement: .
Furthermore, it is important to remark that Theorems X and XI allow us to determine whether a number is prime or composite without making use of a table of prime numbers. It is with the aid of these theorems that I think I have proved that the number .A = 2127 − 1 is prime. This number consists of thirty-nine digits, while the largest prime number currently known consists of only ten digits. This number is, according to Euler, equal to .231 − 1.
The aforementioned Theorems X and XI are stated without proof in the paper. Also, the largest prime known in 1876, but not to Lucas, was in fact a number of 14 digits (see Chap. 2 of Williams [28]), but the statement that he could prove A to be a prime was quite extraordinary because at the time, the number was considered to be very large. Certainly, proving A a prime by trial division would have been out of the question; indeed, it remained the largest known prime for another 75 years. In May of 1876, Lucas [15] introduced the sequences that would later bear his name. He let P and Q be coprime integers and .α and .β be the roots of the quadratic polynomial .f (x) = x2 − P x + Q with .δ = α − β. He then defined what are now called the Lucas sequences .(Un ) and .(Vn ) by using the functions Un = (αn − β n )/δ,
.
Vn = α n + β n .
Since both .Un and .Vn are symmetric functions of the roots of a polynomial with integer coefficients, they must both be integers for all nonnegative integral values of n. He stated that when .P = 1 and .Q = −1, then .Un and .Vn are, respectively, the corresponding Fibonacci and the Lucas numbers. He
4
1 Introduction
also listed a number of identities, including a generalization of the Cassini identity: 2 n−1 .Un − Un+1 Un−1 = Q . It was in this paper that he pointed out that the sequence of Lam´e had been discovered much earlier by Fibonacci. It has been called the Fibonacci sequence ever since, in spite of the priority of the Indian mathematicians of whose work Lucas was completely unaware. On reading [15], Genocchi [7] pointed out that Lucas’ functions were very similar to a pair of functions that he [6] had introduced several years earlier. Genocchi had anticipated several of Lucas’ findings and mentioned that versions of his functions were known to Lagrange and Legendre. Nevertheless, because of the enormous number and variety of results involving .(Un ) and .(Vn ) that Lucas discovered from 1876 until about 1880, they are now named after him. In fact, it was during this period that he applied them in developing tests for the primality of large integers, including what is now called the Lucas-Lehmer test for the primality of Mersenne numbers. For the most part, these tests were sufficiency tests, which, if they were satisfied, could establish that a number N of a certain special form is a prime. As Lucas well realized, these tests were quite novel for their time, because instead of having to trial divide N by a large number of integers, for example, all the primes less than √ . N , it was only necessary to compute some integer S and test whether N divides S. As it seems that Lucas was unaware of the previous work of Genocchi, Lagrange, and Legendre, it is of some interest to investigate where the idea of his functions arose. He does not really address this in [15], instead emphasizing the similarity between his functions and the trigonometric circular functions (see Sect. 4.1). As early as 1872, undoubtedly as a result of his examination of the works of Fermat, he had sharpened his interest in Diophantine problems. (See Lucas [13, 16, 18], where the problems in [13] are dealt with more extensively.) He was almost certainly aware at this time of “Fermat’s last theorem” (FLT). Indeed, much later (1891) in [20], he states: We had hoped to find in this study [of the Lucas sequences], through the prime decomposition of the expressions .(an ±bn ), a demonstration of Fermat’s last theorem concerning the impossibility of solving in integers the indeterminate equation .x
p
+ yp + zp = 0
in which it suffices to assume that p denotes a prime.
Thus, it appears that attempting to prove FLT was a motivating force behind his invention of the Lucas sequences and the development of their theory, but so also was his application of them in primality testing (see Sect. 3.1). Additional information concerning this matter can also be found in Sect. 6.1. It seems remarkable that Lucas did not mention anything about this in print until near the end of his truncated life (see the Appendix), but possibly he
1 Introduction
5
was concerned about not revealing too much information until he had solved the problem or saving himself the embarrassment of failing to do so. In connection with this, it is a great pity that his early death prevented him from completing, among other projects, his proposed commentary on the works of Fermat, which he mentions on page vi of [19] and on the last page of [18]. Although much has been written about the Fibonacci and Lucas numbers, no monograph devoted to the properties of the Lucas sequences has ever appeared in print. This seems remarkable in view of the fact that almost all results concerning the Fibonacci and Lucas numbers have Lucas sequence analogues. There are, however, a few books, besides elementary textbooks, which include substantial sections dedicated to these sequences, particularly as they apply to primality testing. Some of these are Bressoud and Wagon [3], Crandall and Pomerance [4], Ribenboim [24], and Williams [28]. The objective of this book is to provide a much more thorough discussion of the Lucas sequences than is available in existing monographs. We will bring together a variety of results, which are currently scattered throughout the literature. Various sections will be devoted to intrinsic arithmetic properties of these sequences, primality testing, density problems, and the problem of generalizing them. Furthermore, their application, not only to primality testing but to integer factoring, solution of quadratic and cubic congruences, cryptography, and Diophantine equations, will be briefly discussed. Throughout the book, we will include a sprinkling of historical comments, where relevant. Much of the book is not intended to be overly detailed. Rather, our objective is to provide a good, elementary, and clear explanation of the subject matter without too much ancillary material. Most chapters, with the exception of the second and the fourth, will address a particular theme, provide enough information for the reader to get a feel for the subject, and supply references to more comprehensive results. We have also attempted to make most of this work accessible to anyone with a basic knowledge of elementary number theory and abstract algebra. Our intended audience is number theorists, both professional and amateur, students, and enthusiasts. We emphasize that this book was never intended to be a textbook; its focus is either much too narrow or too broad for that, but it might be used as supplementary reading for students enrolled in second or more advanced courses in number theory. Lucas sequences are very simple mathematical objects. They are sequences of integers, where each term of the .(Un ) or the .(Vn ) sequence is a fixed weighted sum of the two previous terms. That is, for all n, we have Xn+2 = P Xn+1 − QXn ,
.
where X is a U or a V Lucas sequence. One would naturally expect them to have mainly additive properties. However, many of their key features arise from their divisibility properties. Several chapters of this book, in one manner or another, show or exploit themes rooted in the multiplicative nature of these sequences. For example, .Um is a multiple of .Un whenever m is a multiple of
6
1 Introduction
n, if m and n are positive integers. We saw that the celebrated Fibonacci sequence and its companion sequence, the sequence of Lucas numbers, form one instance of a pair of Lucas’ functions for .P = 1 and .Q = −1. But putting .P = 2 and .Q = 1 yields .Un = n and .Vn = 2 for all n. This observation, i.e., the fact that the sequence of natural numbers is a Lucas sequence, has been an abundant source of discovery of properties of the Lucas sequences and probably still holds many more future findings. We may call this phenomenon the .n → Un theme. For instance, the simple remarkable identity .2n + 1 = 2 + Fn2 , (n + 1)2 − n2 , which has the Fibonacci cousin identity .F2n+1 = Fn+1 2 2 generalizes to .U2n+1 = Un+1 −QUn , for an arbitrary Lucas sequence .U (P, Q). The trivial identity .(2n) = 2 · n generalizes to .U2n = Vn · Un for a generic pair .(U, V ) of Lucas sequences. In the 1860s, Wolstenholme discovered that p−1 given a prime .p ≥ 5, if we express the rational number . n=1 1/n, in lowest terms as .A/B, A and B natural numbers, then A is a multiple of .p2 . Clearly, p−1 the sum . n=1 2/n has the same property and is a particular instance of the ρ−1 more general sum . n=1 Vn /Un , where the rank .ρ of the prime p in the Lucas sequence .(Un ) is the least positive index t for which .p | Ut . Remarkably, if ρ−1 .ρ is p or .p ± 1, then the numerator of the rational number . n=1 Vn /Un is a multiple of .p2 , (.p ≥ 5). We illustrate the .n → Un theme with two more examples. Two (disjoint) products of consecutive positive integers (containing each at least two terms) are never equal except in one instance. At least one direction of the statement is easily checked. Indeed, 14 · 15 = 5 · 6 · 7,
.
(1.1)
and both products are 210. Thus, one is led to investigate the corresponding question in the context of a general Lucas sequence U . Given two nonzero integers P and Q and .U = U (P, Q), solve the Diophantine equation Um Um+1 · · · Um+s = Un Un+1 · · · Un+t ,
.
(1.2)
in positive integers m, n, s, and t, with s and t at least two. Corollary 1.3 and Table 1 p. 293 of [26] tell us, among other things, that no other solutions to (1.2) exist, besides (1.1). An integer sequence X has the Pillai property if there is a (minimal) bound .bX ≥ 2 such that for all .k ≥ bX , the sequence X has k consecutive terms such that none is prime to the product of the .k − 1 others. The sequence of natural numbers I, (.In = n), is a Pillai sequence with .bI = 17. (See [2, 21].) Hajdu and Szikszai proved [9, Thm. 1] that every nondegenerate Lucas sequence .U (P, Q), i.e., such that .Un = 0 if .n ≥ 1, satisfying .gcd(P, Q) = 1, is a Pillai sequence. For most parameters P and Q, .bU is again equal to 17, but there are two infinite families of parameters .(P, Q) with, respectively, .bU = 25 and .bU = 43. For the Fibonacci sequence, .bF = 25.
1 Introduction
7
The two foregoing topics, and a number of other results concerning Lucas sequences, are not treated in this book. This is to say that, although this book gathers together the basic theory of Lucas sequences and certain special topics, applied and theoretical, that are dear to the authors, it was not our intention to give an exhaustive account of the subject, much of which can be found in number theory journals, and in particular, but not exclusively, in Integers, the Fibonacci Quarterly, and the Journal of Integer Sequences, all of which provide a free online access to their papers, with a modest current Fibonacci fee (i.e., $55 or $89) for access to the last 5 years of the Fibonacci Quarterly. We begin, in the next chapter, by providing a thorough and rigorous account of the basic identity and arithmetic features of the Lucas sequences summarized in Lucas’ memoir [17]. We will not, however, record a great many of the large number of identity properties involving .(Un ) and .(Vn ) that Lucas discovered—only the ones that we found useful in the development of our theme. For those who are interested in identities, we refer the reader to [17] and Chap. 4 of [28]. Many more identities can be found in various articles of the Fibonacci Quarterly, but also in the Journal of Integer Sequences or in Integers, and to a lesser degree in the Journal of Number Theory and the International Journal of Number Theory. For example, the first formula of [28, (4.2.4)] is the Lucas function version of Catalan’s identity: 2 Un2 − Un+m Un−m = Qn−m Um ,
.
an identity which occurs as (32) in [17]. Also, [28, (4.2.14)] yields the Lucasian analogue of Vajda’s formula: Un Un+i−j − Un+i Un−j = Qn−j Ui Uj .
.
A short proof of the Lucasian analogue of Johnson’s formula can be found in [1, Lemma 6]: Ua Ub − Uc Ud = Qr (Ua−r Ub−r − Uc−r Ud−r ),
.
which holds provided .a + b = c + d. Furthermore, we do not always insist that .gcd(P, Q) = 1. Some of the results that we will mention, particularly the divisibility properties of .Vn , seem not to have been known to Lucas, but it is difficult to know this for certain because he stated in [18, p. 44] that he had produced an additional 20 sections for [17] which he had not yet published (and never did). In Chap. 3, we start with a discussion of the Mersenne numbers. We next describe several applications of the Lucas sequences to such problems as primality testing, solving certain congruences modulo a prime, and integer factorization. We then look at how these sequences have been used to deal with some particular Diophantine equations and with the problem of secure
8
1 Introduction
communication. As in any of these applications, it is essential that we be able to compute remote terms in the Lucas sequences modulo some fixed number; we show how this can be done efficiently. Chapter 4 consists of several miscellaneous results concerning the Lucas sequences. These include the relationship of these sequences to the circular functions, the Chebyshev polynomials, and the Dickson polynomials. We also provide some further arithmetic properties of the Lucas sequences, briefly describe Lehmer’s extension of these sequences, and discuss the primitive divisor theorem. We conclude by considering the problem of finding those moduli for which .(Un ) has a full set of residues. Chapter 5 is an in-depth examination of the Lucasnomials and their properties. These objects, which can be considered as generalizations of the binomial coefficients, owe their integrality to a remark made by Lucas, but beyond that, he did not provide results concerning them. Chapters 6, 7, and 8 are devoted to various aspects of Lucas’ problem of finding a generalization of his sequences. Several of Lucas’ ideas are discussed at some length, and some candidates as possible generalizations are provided. Every prime number not dividing Q divides some of the terms .Un . However, if infinitely many primes divide terms of a given V sequence, infinitely many do not. Chapter 9 explains how starting with initial questions asked independently by Sierpi´ nski for .(2n + 1) and by Ward for .(Ln ), Hasse, and later Lagarias came up with a remarkable method that gives the exact proportion of primes that divide a V sequence. For instance, on average, 17 out of 24 primes divide some term of the form .2n + 1. A generalization of the method of Hasse and Lagarias to computing the density of primes which divide .s − 1 consecutive terms for some specific linear recurrences of order s, (.s ≥ 2), is also explained. In Chap. 10, we provide a brief overview of the book and a selection of unsolved problems or open investigations. Finally, in the Appendix, we provide a short biography of Lucas’ life, where we mention some of his personality traits and discuss his legacy. Every chapter starts with some quotations. They should be viewed as condiments to the main text. We have limited ourselves to realms that may supposedly be of interest to our readership. Many of us teach and, thus, have to communicate effectively; many do research and many enjoy mathematics; others yet are students of mathematics. Consequently, these passages apply to mathematics, the sciences, research, creativity, the learning process, writing, telling, teaching, communication, perseverance, intuition, and even poetry. ´ Partially in honor of Edouard Lucas, we have often elected not to translate quotations from French authors into English.
References
9
References 1. C. Ballot, Another Lucasnomial Generalization of Wolstenholme’s Congruence, J. Integer Seq. 23 (2020), Article 20.3.7. 2. A. Brauer, On a property of k consecutive integers, Bull. Amer. Math. Soc. 47 (1941), 328–331. 3. David Bressoud and Stan Wagon, A Course in Computational Number Theory, Key College Publishing, 2000, 367pp. 4. Richard Crandall and Carl Pomerance, Prime Numbers: A Computational Perspective, 2nd Edition, Springer, 2005, 597pp. 5. Keith Devlin, Finding Fibonacci, Princeton University Press, Princeton NJ, 2017. 6. A. Genocchi, Intorno ad alcune forme di numeri primi, Annali Mat. Pura Appl. 2(2) (1868/9), 256–267. 7. A. Genocchi, Intorno a tre problem aritmetici, Atti della Reale Accademia della Scienze di Torino 11 (1876), 811–829, Addendum 924–927. 8. B. R. Gilson, The Fibonacci Sequence and Beyond, CreateSpace, 2009, 146pp. 9. L. Hajdu and M. Szikszai, On the GCD-s of k consecutive terms of Lucas sequences, J. Number Theory 132 (2012), no. 12, 3056–3069. 10. Robert C. Johnson, Fibonacci numbers and matrices, preprint, 2009, available with the author’s permission at https://www.researchgate.net/ publication/228548460 Fibonacci numbers and matrices. 11. Thomas Koshy, Fibonacci and Lucas Numbers with Applications, Vol. 1, Second ed., John Wiley and Sons, 2018, 669pp. 12. G. Lam´e, Note sur la limite du nombre des divisions dans la recherche du plus grand commun diviseur entre deux nombres entiers, C. R. Acad. Sci. Paris S´er. I Math. 19 (1844), 867–870. ´ Lucas, Recherches sur l’analyse ind´etermin´ee et arithm´etique de Dio13. E. phante, Bulletin de la Soci´et´e d’´emulation du D´epartement de l’Allier 12 (1873), 441–532. ´ Lucas, Note sur l’application des s´eries r´ecurrentes a ` la recherche de 14. E. la loi de distribution des nombres premiers, C. R. Acad. Sci. Paris S´er. I Math. 82 (1876), 165–167. ´ Lucas, Sur la th´eorie des nombres premiers, Atti della Reale Ac15. E. cademia della Scienze di Torino 11 (1876), 928–937. ´ Lucas, Recherches sur plusieurs ouvrages de Leonardo de Pise et sur 16. E. diverses questions d’arithm´etique sup´erieure, Bolletino di Bibliografia e di Storia della Scienze Matematiche e Fisiche 10 (1877), 129–193, 239–293. ´ Lucas, Th´eorie des fonctions num´eriques simplement p´eriodiques, 17. E. Amer. J. of Math. 1 (1878), 184–240, 289–321. ´ Lucas, Notice sur les Titres et Travaux Scientifiques de M. Edouard ´ 18. E. Lucas, D. Jouaust, Paris, 1880. ´ Lucas, R´ecr´eations Math´ematiques, Deuxi`eme ´edition, Gauthier19. E. Villars, Paris, 1891.
10
1 Introduction
´ Lucas, Questions propos´ees ` a la discussion des 1re et 2e sections, 1◦ 20. E. Questions d’arithm´etique sup´erieure, Assoc. Fran¸caise pour l’Avancement des Sciences, Compte rendu des sessions 20 (1891), 149–151. 21. S. S. Pillai, On m consecutive integers, I. Proc. Indian Acad. Sci., Sect. A. 11 (1940), 6–12. 22. A. S. Posamentier and I. Lehman, The Fabulous Fibonacci Numbers, Prometheus Books, 2007, 364pp. 23. Y. Puri and T. Ward, A dynamical property unique to the Lucas sequence, Fibonacci Quart. 39 (2001), no. 5, 398–402. 24. Paulo Ribenboim, The Book of Prime Number Records, 2nd Edition, Springer-Verlag, 1989, 479pp. 25. P. Singh, The so-called Fibonacci numbers in ancient and medieval India, Historia Mathematica 12 (1985), 229–244. 26. M. Szikszai, Distinct products in Lucas sequences–on a problem of Kimberling, Fibonacci Quart. 55 (2017), no. 4, 291–296. 27. S. Vajda, Fibonacci and Lucas Numbers, and the Golden Section: Theory and Applications, Dover Publications, Inc., 2008. ´ 28. H. C. Williams, Edouard Lucas and Primality Testing, WileyInterscience, John Wiley and Sons, New York, 1998.
Chapter 2
Basic Theory of the Lucas Sequences
A mathematician is a pattern searcher. That’s all we do all day. (Marcus de Sautoy) Understanding is a kind of ecstasy.
(Carl Sagan)
Abstract This chapter discusses the fundamental properties of Lucas sequences. Those who have worked with, or who have had an interest in, Lucas sequences will be aware of a good part of the material in the chapter, but we hope to bring about a degree of precision and completeness concerning these basic properties along with proofs. Regular, standard, degenerate, as well as general Lucas sequences are defined. Their most basic and important identities are reviewed; divisibility properties and the p-adic valuation of their terms are studied for all primes p, whether regular or special. The notion of the rank and rank exponent of a prime, the Lucas laws of appearance and repetition, the lifting-the-exponent lemma, as well as the Euler criterion for Lucas sequences are encountered along the way. We did not seek the most concise exposition, but rather one that brings some insight and is strewn with remarks. In fact, we often give several proofs of the same result, providing elementary ones always, but occasionally also proofs that use basic algebraic number-theoretic concepts. Of course, these results are of use, in particular, in all chapters of the book.
2.1 Definition The theory and properties of the Lucas sequences are scattered in various places in the literature and were already largely present in Lucas’ work [12, 13], although not expressed as clearly as by later authors (Carmichael [3], D. H. Lehmer [10], etc.) or by those who, here and there, taught classes © Springer Nature Switzerland AG 2023
C. J.-C. Ballot, H. C. Williams, The Lucas Sequences, CMS/CAIMS Books in Mathematics 8, https://doi.org/10.1007/978-3-031-37238-4 2
11
12
2 Basic Theory of the Lucas Sequences
in number theory that included this subject. For instance, Raphael Robinson took classes from D. N. Lehmer at the University of California at Berkeley which included some theory of Lucas sequences. The theory of Lucas sequences was taught by Robinson himself in the 1950s at the same university. John Brillhart, who attended Robinson’s lectures, taught such a class at the University of Arizona in the fall of 1993, which one of the authors of this book had the opportunity to attend. Part of the basic theory of Lucas sequences has also appeared elsewhere more recently: in two sections of the book of Hardy and Wright [7, Sect. 10.14; Sect. 15.5], in Ribenboim’s original paper [15], in Williams’ book [17, Chap. 4], and in Ballot’s paper [1]. The p-adic valuation of terms of the Lucas sequences treated here in Sects. 2.4, 2.5, 2.6, and 2.7 has appeared in [11] for the Fibonacci and Lucas numbers, in [1, Sect. 3.2.1], in [17, Chap. 4], and even more recently in [16]. But some material has either seldom or never appeared in published form yet, particularly in Sects. 2.9 and 2.12. We emphasize some notation used in the chapter. If a and b are rational integers, we say that a divides b and write .a | b, provided there is a rational integer c such that .b = ac. In particular, .0 | a implies .a = 0. Given a rational prime p and an integer n, its p-adic valuation, .νp (n), is the largest nonnegative integer v such that .pv | n. Thus, .pv+1 n. We put .νp (0) = +∞. We also write .pv || n. If .m/n is a rational number, then its p-valuation is the valuation difference .νp (m) − νp (n). Thus, .ν2 (−24) = 3, .ν3 (2/9) = −2, and .ν5 (7/6) = 0. Within the rational integers .Z, the relation .m ∼p n, or .m ∼ n (base p), says that the integers m and n have the same p-adic valuation. Hence, .3 ∼3 42, .2 ∼3 1, and .75 ∼ 25 (base 5). If .n ∼p 0, then .n = 0. We make frequent use of the Iverson symbol .[−], which is the Boolean function that assigns 1 to .[P], if .P is a true statement, and 0, if .P is false. Given two nonzero rational integers P and Q, one defines a pair .{U, V } of Lucas sequences. They both satisfy the same binary recursion Xn+2 = P Xn+1 − QXn , for n ≥ 0.
.
(2.1)
One is called the fundamental Lucas sequence. The other is the companion, or the associate Lucas sequence. Following Lucas and tradition, .U (P, Q), or more briefly the letter U , denotes the fundamental sequence, while .V (P, Q), or V , denotes the companion sequence. The sequence .U = (Un )n≥0 satisfies the initial conditions .U0 = 0, U1 = 1. (2.2) The initial conditions that define the companion sequence are V = 2, V1 = P.
. 0
(2.3)
Note that all terms .Un and .Vn , .n ≥ 0, are integral. We often refer to .Un = Un (P, Q) and .Vn = Vn (P, Q) as the Lucas functions. In the interest of brevity, we will often use the symbols .Un and .Vn without including the parameters
2.1 Definition
13
P and Q when it is understood from context what P and Q are or when we refer to .Un (P, Q) and .Vn (P, Q) for any P and Q. Lucas and, subsequently, many authors developed the theory with the hypothesis that the parameters P and Q are coprime. The Lucas sequences are said to be regular whenever .gcd(P, Q) = 1. Although regular Lucas sequences possess stronger properties, we do not generally choose this approach because much of the Lucas theory remains valid, or “locally” valid for primes p not dividing .gcd(P, Q), for nonregular sequences. In fact, the mathematical literature contains many papers that prove results about regular Lucas sequences, which hold just as well for nonregular Lucas sequences. We let .D = P 2 − 4Q denote the discriminant of the characteristic polynomial .x2 − P x + Q and .α and .β denote its zeros.† Thus, .D = (α − β)2 , .P = α + β, and .Q = αβ. Throughout this work, we will write .δ for .α − β so that P −δ P +δ and β = . (2.4) .α = 2 2 (The usual convention when .D > 0 is to choose .α > β.) If .D = 0, then the closed forms of .Un and .Vn , their so-called Binet form, symmetric in the two zeros, are Un =
.
αn − β n α−β
and
Vn = α n + β n .
(2.5)
Remark 1 Thus, the integrality of all .Un terms, .n ≥ 0, generalizes the fact that for all rational integers x and y, .x − y divides .xn − y n . Remark 2 One sees that the fundamental sequence is, up to a constant, the difference of two exponential functions, while the companion is the sum of these two same functions. The sine and the cosine functions, respectively, obey the same property. This explains the title of the famous memoir of Lucas [12]. As Lucas had observed [12, Sect. II], this remark provides an explanation for the existence of a correspondence between trigonometric identities, or hyperbolic identities, and the Lucas identities involving the sequences U and V . In some substantial way, the arithmetic of a Lucas pair .{U, V } constitutes a discrete version of trigonometry. For some results, it is either necessary or convenient to assume that all terms .Un , .n ≥ 1, are nonzero. Such sequences are said to be nondegenerate. On the contrary, if some .Un = 0 with .n ≥ 3, then U is called degenerate. A complete description of degenerate cases is done in Sect. 2.11. Had we allowed the parameter P to be 0, all our theory would have carried over; but if .P = 0, then .U2n = 0 and .U2n+1 = (−Q)n . One subsequence is constant and the other geometric. Doing without this degenerate case and, thus, assuming .P = U2 = 0 does no harm. † Lucas uses the capital Greek letter .Δ for the discriminant. However, for better homogeneity with the Roman letters .Un , .Vn , P , and Q, we prefer the Roman letter D.
14
2 Basic Theory of the Lucas Sequences
If D is zero, then the double root .α is the integer .P/2. In this case, the closed forms become Un = nαn−1
.
and
Vn = 2αn .
(2.6)
Note that one may obtain (2.6) using the Binet form (2.5) for .Un and .Vn . Indeed, .Un is a symmetric polynomial in .α and .β since Un =
n−1
.
αn−1−k β k ,
k=0
so that taking the limits .limβ→α Un and .limβ→α Vn in (2.5) yields (2.6). Whenever .D = 0, we refer to U (and V ) as being nonzero-discriminant or standard Lucas sequences. Thus, nonstandard Lucas sequences satisfy (2.6), whereas standard ones satisfy (2.5). Example 1 The pairs .{(In ), 2}, .{(Mn ), (2n + 1)}, and .{(Fn ), (Ln )} are particular .{U, V } pairs. Here, .In := n is the identity sequence, .Mn := 2n − 1 is the sequence of Mersenne numbers, and F denotes the Fibonacci sequence and L the sequence of Lucas numbers. The three correspondingn values of q −1 .(P, Q) are, respectively, .(2, 1), .(3, 2), and .(1, −1). The numbers . q−1 , which appear in Gaussian or q-binomial coefficients, if one sets the parameter q to . be a fixed integer, form the Lucas sequences .U (q + 1, q).†
2.2 Most Common Identities Because of the correspondence with trigonometry, identities are plentiful. The purpose of this section is only to present those identities which appear in many contexts. They are the most important. These include the Pythagorean, the double-angle, the addition, the subtraction, and several multiplication formulas. The latter three give .Xm+n , .Xm−n , and .Xmn in terms of .Xm , ∗ ∗ ∗ .Xm , .Xn , and .Xn , where .{X, X } = {U, V }. All the formulas shown in this section except for the identity (2.42) can be found in Lucas’ work, and we occasionally point out exactly where. The two Binet forms (2.5) and (2.6) permit us to extend the definition of Lucas sequences to negative indices.‡ Thus, we obtain formulas that correspond to .sin(−x) = − sin x and .cos(−x) = cos x, namely, for all integers n †
Nowhere in Lucas’ writings is there a hint of his being aware of Gaussian coefficients even though one could have fancied his use of the letters P and Q came from there. ‡ Doing so corresponds to running the recursion (2.1) backward. Indeed, .(x − α−1 )(x − β −1 ) = x2 − Q−1 P x + Q−1 . But .U−(n+2) = Q−1 P U−(n+1) − Q−1 U−n is equivalent to .U−n = P U−n−1 − QU−n−2 .
2.2 Most Common Identities
15
Qn U−n = −Un
.
Qn V−n = Vn .
and
(2.7)
The former formula in (2.7) is seen to hold because, if .D = 0, then δQn U−n = (αβ)n (α−n − β −n ) = β n − αn = −δUn ,
.
while, if .D = 0, then Qn U−n = α2n · (−n)α−n−1 = −nαn−1 = −Un .
.
Similarly,
Qn V−n = (αβ)n (α−n + β −n ) = β n + αn = Vn .
.
The Pythagorean formula .cos2 x + sin2 x = 1 is embedded in the form V 2 − DUn2 = 4Qn .
. n
(2.8)
From .δUn = α − β and .Vn = α + β , we obtain the two identities n
n
n
n
Vn + δUn = 2αn , .
Vn − δUn = 2β n ,
(2.9)
which when multiplied together yield (2.8). If .α = β, i.e., if .δ = 0, then (2.8) is readily seen to hold. In correspondence with the trigonometric identities .
sin(x + y) = sin x cos y + sin y cos x, cos(x + y) = cos x cos y − sin x sin y,
we have the so-called addition formulas of Lucas [12, Sect. IX] 2Um+n = Um Vn + Un Vm , 2Vm+n = Vm Vn + DUm Un .
.
(2.10) (2.11)
The subtraction formulas are 2Qn Um−n = Um Vn − Un Vm , 2Qn Vm−n = Vm Vn − DUm Un .
.
(2.12) (2.13)
To prove these or other identities, we may use the Binet formulas for Un and .Vn , but another method which we will refer to as the RIC method (RIC standing for “recursion plus initial conditions”) is often handy. If there are several variables as in (2.10) where we have the two variables m and n, we fix one of the variables to an arbitrary value. Then we compare the recursions satisfied by both the left and the right sides of the equation. If those recursions agree and have order r, then we compare initial conditions or the coincidence of any r consecutive values. For instance, for (2.10), say
.
16
2 Basic Theory of the Lucas Sequences
we fix m. Then the functions .n → 2Um+n and .n → Um · Vn + Vm · Un both satisfy the second-order recursion (2.1). We compare initial conditions, say at .n = 0 and .n = 1. For .n = 0, both sides are equal to .2Um . Replacing n by 1 in (2.10), we obtain .2Um+1 = P Um + Vm . But this identity itself is easily checked by RIC. Both sides are functions of m that satisfy the same ordertwo recursion and take the values 2 and 2P for the respective values 0 and 1 of m. This proves the summation formula for fundamental Lucas sequences. The RIC technique works just as well for identity (2.11). The subtraction formulas are a direct consequence of the addition formulas. For instance, using (2.10) and (2.7), we find that 2Qn Um−n = 2Qn Um+(−n) = Qn (Um V−n + U−n Vm )
.
= Um (Qn V−n ) + (Qn U−n )Vm = Um Vn − Un Vm . Remark 3 At this point, we wish to clarify the extent to which all formulas in this section are valid. They hold for all Lucas sequences including degenerate, zero-discriminant, or nonregular cases. Moreover, most are valid for all integral indices, not just nonnegative indices, unless otherwise stated. Also, the limit argument by which we obtained the Binet forms (2.6) from (2.5) may seem somewhat dubious: On what .β-support do we take the limit as .β → α? Besides, .α is often not a fixed target as .β changes. But the argument can be made rigorous. Indeed, a formula involving U and/or V terms at a few indices as well as possibly P , Q, and D can be transformed into a two-variable expression in .α and .β equal to 0. Once the formula is proved 0, then we may consider the polynomial in two variables that results for .D = from putting .x = α and .y = β. Occasionally, it may not be a polynomial, but by a small manipulation, it can be made to be a polynomial, e.g., if .n < 0 in (2.12), then multiply out by .Q−n . Thus, we have a polynomial equal to 0 for infinitely many values of x and y. Therefore, it is zero for all values of x and y, and, in particular, the identity holds for .x = y. Although checking out the 0 case and may be formulas in the .D = 0 case is often easier than the .D = fun to perform, it is not necessary. Subtracting side to side (2.12) from (2.10) yields Um+n = Vm Un + Qn Um−n ,
.
(2.14)
whereas the subtraction of (2.13) from (2.11) gives V
. m+n
= DUm Un + Qn Vm−n .
(2.15)
Also adding side to side (2.12) and (2.10) yields Um+n = Um Vn − Qn Um−n .
.
Similarly, the addition of (2.13) and (2.11) gives
(2.16)
2.2 Most Common Identities
17
V
. m+n
= Vm Vn − Qn Vm−n .
(2.17)
On interchanging n with m in, respectively, (2.16) and (2.17), we obtain for either .X = U or .X = V Xn+m = Vm Xn − Qm Xn−m .
.
(2.18)
In particular, replacing n by .m(n + 1) in (2.18) yields Xm(n+2) = Vm Xm(n+1) − Qm Xmn .
.
(2.19)
When .m = 1, we recover the basic defining recursion of the Lucas pair (U, V ). But it also says, given any .m ≥ 2 and provided .Um = 0, that the sequences .Un = Umn /Um and .Vn = Vmn form a derived pair of Lucas sequences associated with the parameters .P = Vm and .Q = Qm . Their characteristic polynomial .x2 − Vm x + Qm has zeros .αm and .β m . In particular, we obtain the useful identities
.
Umn (P, Q) = Um (P, Q) · Un (Vm , Qm ),
.
(2.20)
and V
. mn
(P, Q) = Vn (Vm , Qm ).
(2.21)
Remark 4 We observe that the two identities (2.20) and (2.21) are straightforward to see. Assume .αm = β m . Then αm − β m (αm )n − (β m )n αmn − β mn = · , α−β α−β αm − β m
Umn (P, Q) =
.
(2.22)
whereas V
. mn
(P, Q) = (αm )n + (β m )n = Vn (Vm , Qm ).
Putting .m = n in (2.14), or in (2.10), we obtain the so-called double-angle identity U2n = Un Vn .
.
(2.23)
By the Binet formula for V and the Pythagorean identity, we readily find identities that correspond to .cos(2x) = 2 cos2 x − 1 = 1 − 2 sin2 x, namely, V
. 2n
Adding
2 .Vn
− 2Q to n
= Vn2 − 2Qn = DUn2 + 2Qn .
2 .DUn
(2.24)
n
+ 2Q yields
2V2n = Vn2 + DUn2 ,
.
standing for .cos(2x) = cos2 x − sin2 x. Replacing m by n and n by 1 in both (2.14) and (2.15) yields
(2.25)
18
2 Basic Theory of the Lucas Sequences
Un+1 − QUn−1 = Vn
Vn+1 − QVn−1 = DUn .
and
.
(2.26)
The famous Cassini† identity .Fn−1 Fn+1 − Fn2 = (−1)n for the Fibonacci numbers has a more general form for U sequences, and an analogous identity exists for sequences V . These are Un2 − Un−1 Un+1 = Qn−1
.
and
Vn2 − Vn−1 Vn+1 = −DQn−1 .
(2.27)
They can be proved by various techniques, e.g., using the Binet formulas, or an inductive reasoning, or matrices. For instance, if .D = 0, we see that D(Un2 − Un−1 Un+1 ) = (αn − β n )2 − (αn−1 − β n−1 )(αn+1 − β n+1 )
.
= −2Qn + (α2 + β 2 )Qn−1 = −2Qn + (P 2 − 2Q)Qn−1 = DQn−1 , which yields the first identity on cancelling out D. Because, as can be verified by induction, one has for all integers n n Un+1 −QUn P −Q . = , Un −QUn−1 1 0 we may equate the determinants on both sides and see that Qn = −Q(Un+1 Un−1 − Un2 ),
.
yielding again the first identity in (2.27). We now give one pair of multiplication formulas of Lucas [13, Sect. 183, p. 319] valid for all integers .m ≥ 0 and all integers n (m−1)/2
2m−1 Umn =
.
k=0
m Dk Un2k+1 Vnm−2k−1 , 2k + 1
(2.28)
and m/2
2m−1 Vmn =
.
k=0
m Dk Un2k Vnm−2k . 2k
(2.29)
The two identities (2.28) and (2.29) are usually proved by either subtracting or adding the two sides of (2.9) raised to the mth power. Thus, for instance, with a subtraction, we obtain
† The Fibonacci numbers were known to a number of early investigators, but not under that name. They were often discussed as being components of the convergents to the continued √ fraction expansion of the golden ratio: .(1 + 5)/2.
2.2 Most Common Identities
19
(2αn )m − (2β n )m = (Vn + δUn )m − (Vn − δUn )m m m m m m−k k Vn Vnm−k (−δUn )k = (δUn ) − k k k=0 k=0 m V m−2k−1 δDk Un2k+1 , =2 2k + 1 n
.
k≥0
0, yields the multiplication formula which after division by .2δ, assuming .D = (2.28). Lucas [13, Sect. 179, p. 312] had observed that .Un is a homogeneous polynomial of degree .n − 1 in P and Q, while .Vn is a homogeneous polynomial of degree n in P and Q, provided in both cases the degree in Q is counted in P with √ double weight. That is, .Un and .Vn are homogeneous polynomials √ and . Q of respective degrees .n − 1 and n, where powers of . Q are always even. We provide these polynomials in P and Q for .1 ≤ n ≤ 6 in Table 2.1. Table 2.1 .Un and .Vn as polynomials in P and Q n 1 2 3 4 5 6
.Un
.Vn
1 P .P 2 − Q .P 3 − 2P Q .P 4 − 3P 2 Q + Q2 .P 5 − 4P 3 Q + 3P Q2
.P 2 − 2Q .P 3 − 3P Q .P 4 − 4P 2 Q + 2Q2 .P 5 − 5P 3 Q + 5P Q2 6 .P − 6P 4 Q + 9P 2 Q2 − 2Q3
P
In general, we find for all .n ≥ 0 Un = Ψn (P, Q),
.
(2.30)
where
(n−1)/2
Ψn = Ψn (P, Q) :=
.
k=0
(−1)k
n−k−1 P n−2k−1 Qk . k
(2.31)
Actually, if .(Xn ) satisfies the recursion (2.1), then it follows from the identity .Ψn+2 = P Ψn+1 − QΨn and induction on n that for all .n ≥ 1, Xn = Ψn X1 − QΨn−1 X0 ,
.
where we adopted the convention .Ψ0 = U0 = 0. Hence, .Vn = P Ψn − 2QΨn−1 , which, using n n−1−k n−k n−1−k = , +2 . k−1 k k n−k
(2.32)
(2.33)
20
2 Basic Theory of the Lucas Sequences
√ yields .Vn , for all .n ≥ 1, as the homogeneous polynomials in P and . Q on the right-hand column of Table 2.1, i.e., n n − k .Vn = (2.34) P n−2k (−Q)k . k n n − k k≤ 2
The multiplication formulas (2.28) and (2.29) have the peculiarity of bearing a power of 2 in front of .Umn and .Vmn . But Lucas [12, Sects. XII–XIII], [13, Sect. 183, p. 318] also considered another set of multiplication formulas expressing .Umn /Un and .Vmn as polynomials in .Vn and Q. These formulas extend the double-angle formula (2.23). They correspond to the de Moivre formulas giving . sin(mx) sin x and .cos(mx) as polynomials in .cos x, as Lucas himself pointed out [12, Sects. XII, p. 208]. Thus, for .m ≥ 1 and .n ≥ 1, we have (n−1)/2
Umn = Um
.
k=0
n−k−1 (−1)k Qkm Vmn−2k−1 , k
(2.35)
and n/2
V
. mn
=
k=0
n−k n (−1)k Qkm Vmn−2k . n−k k
(2.36)
To derive (2.35), one can use the identities (2.30) and (2.31) with .P = Vm and .Q = Qm . Hence, n−1−k m .Ψn (Vm , Q ) = (−1)k Vmn−1−2k Qmk = Umn /Um . k n k< 2
We note that (2.34) can also be viewed as a particular instance of the formal polynomial identity in A and B: n/2 n
n
A +B =
.
k=0
n−k n (−1) (AB)k (A + B)n−2k . n−k k k
(2.37)
(Identity (2.37) can also easily be derived by appealing to an instance of the Girard-Waring formula—see, for example, [6].) Lucas used (2.37) to produce yet another pair of multiplication formulas. Replacing n by m in (2.37), and then putting .A = αn and .B = −β n , we get for odd m
(m−1)/2
Umn =
.
k=0
and for even m
m−k m Qkn D(m−2k−1)/2 Unm−2k m−k k
(2.38)
2.2 Most Common Identities
m/2
V
. mn
=
k=0
21
m m−k Qkn D(m−2k)/2 Unm−2k . m−k k
(2.39)
Also, .2n−1 Un and .2n−1 Vn can be expressed as homogeneous polynomials in P and D, if degrees in D are doubled. Indeed, n n−1 .2 Un = (2.40) P n−2k−1 Dk , 2k + 1 k≥0
and 2n−1 Vn =
.
n P n−2k Dk . 2k
(2.41)
k≥0
As Lucas did [13, p. 317], this can be proved by expanding the binomial formula (2.4) on .α and .β, i.e., 2n δUn = 2n (αn − β n ) = (P + δ)n − (P − δ)n n n = P n−k δ k − P n−k (−δ)k k k k k n n =2 P n−k δ k = 2δ P n−2k−1 Dk , k 2k + 1
.
k odd
k≥0
which upon division by .2δ yields (2.40). Formula (2.41) can be obtained by expanding similarly .2n Vn = (P + δ)n + (P − δ)n . Another useful identity, valid for all integers m and n, is given below Um = Un+1 Um−n − QUn Um−n−1 .
.
(2.42)
The RIC method works well. (Fix m to an arbitrary integer value. Then check the identity for the two consecutive values m and .m + 1 of n using (2.7).) We observe that (2.42) is also often used in the equivalent form Um+n = Um Un+1 − QUm−1 Un .
.
(2.43)
Putting .m = n + 1 in (2.43) yields the identity 2 U2n+1 = Un+1 − QUn2 ,
.
(2.44)
which for the Fibonacci sequence .F = U (1, −1) gives the classical formula 2 F2n+1 = Fn2 + Fn+1 .
.
(2.45)
Not to prejudice the V -side of Lucas sequences, we provide an identity somewhat like (2.42), but for companion sequences, namely, V
. m
= Un+1 Vm−n − QUn Vm−n−1 .
(2.46)
22
2 Basic Theory of the Lucas Sequences
2.3 General Divisibility Properties Although the Lucas sequences are second-order linear recurrences and as such are defined additively, they, perhaps surprisingly, possess divisibility properties. In fact, these multiplicative properties form an important key feature of these sequences. A sequence of integers .(Xn )n≥0 , satisfying .X0 = 0 and m | n =⇒ Xm | Xn ,
.
(2.47)
for all .0 < m < n is said to be a divisibility sequence, or less frequently a divisible sequence. Note, in particular, that if .Xm = 0, then .Xn = 0 for all multiples n of m. We assume the integers m and n to be nonnegative throughout this section. Lemma 1 The parity of .Un and .Vn , .n ≥ 0, is given by the rules: Q even and P odd =⇒ all Xn , n ≥ 1, are odd. Q and P even =⇒ all Xn , n ≥ 0, are even, except for U1 . P Q odd =⇒ 2 | Xn ⇐⇒ 3 | n.
.
Q odd and P even =⇒ 2 | Vn , for all n ≥ 0, and 2 | Un ⇐⇒ 2 | n, where X stands for U or V . Proof These implications are readily seen by applying the recursion (2.1) modulo 2. For instance, for the last two where Q is odd, we find that if P is odd, then both U and .V (mod 2) are 0, 1, 1, 0, 1, 1, . . . , 0, 1, 1, . . .
.
In particular, .2 | Xn ⇐⇒ 3 | n, where X is either U or V . If P is even, then . all V terms are even, while only even-indexed U terms are even. Theorem 2 The sequence .U = U (P, Q) is a divisibility sequence, i.e., m | n =⇒ Um | Un .
.
Proof This is a direct consequence of identity (2.20) or of formula (2.35). . Remark 5 An alternate proof of Theorem 2 may be obtained from the multiplication formula (2.28). Say .n = km. Then applying the formula to .Ukm , we see that .Um divides .2k−1 Un . Thus, if .Um is odd, then the theorem follows. If .Um is even, then, by Lemma 1, .Vm is also even. Hence, each term of the sum (k−1)/2 k i 2i+1 k−2i−1 . Vm is individually divisible by .2k−1 Um . i=0 2i+1 D Um If .a ≥ 2 is an integer, then it has been known at least since the time of Fermat that
2.3 General Divisibility Properties .
gcd(am − 1, an − 1) = agcd(m,n) − 1.
23
(2.48)
Indeed, without loss of generality, we may suppose .m ≥ n > 0. Say .m = qn+r with .0 ≤ r < n. To show (2.48) holds, it suffices to check that .
gcd(am − 1, an − 1) = gcd(an − 1, ar − 1).
From the identity am − 1 = aqn+r − 1 = ar (an )q − ar + ar − 1 = ar (an )q − 1 + ar − 1,
.
we see that any common factor of .am − 1 and .an − 1 is also a common factor of .an − 1 and .ar − 1 and vice versa. After dividing equation (2.48) through by .a − 1, we obtain that .U (a + 1, a) is a strong divisibility sequence, i.e., a sequence of integers .(Xt )t≥0 such that for all .m ≥ n > 0, we have .
gcd(Xm , Xn ) = |Xgcd(m,n) |.
(2.49)
The next theorem pins down a necessary and sufficient condition on P and Q which makes .U (P, Q) strongly divisible. Theorem 3 For all .m ≥ n > 0, the sequence .U (P, Q) satisfies .
gcd(Um , Un ) = |Ugcd(m,n) | if and only if gcd(P, Q) = 1.
A Lucas sequence .U (P, Q) with .gcd(P, Q) = 1 is called regular. Before proving Theorem 3, we establish a few useful lemmas. Lemma 2 If U is regular, then .
gcd(Un , Q) = gcd(Vn , Q) = 1,
for all .n ≥ 1. Proof Let X be U or V . By (2.1), we see that .Xn+2 ≡ P Xn+1 (mod Q), (.n ≥ 0). As .U1 = 1 and .V1 = P , a simple induction shows that .Un ≡ P n−1 (mod Q) and .Vn ≡ P n (mod Q) for all .n ≥ 1. Thus, if a prime p divides both .Xn and Q, then .p | P n . Thus, .p | gcd(P, Q). This contradicts the . hypothesis. Lemma 3 Let U , V be a pair of Lucas sequences. Then for all .n ≥ 0, .
gcd(Un , Vn ) | 2Qn/2 .
Proof The lemma is a direct consequence of the Pythagorean identity (2.8) V 2 − DUn2 = 4Qn .
. n
24
2 Basic Theory of the Lucas Sequences
Lemma 4 If U is regular, then for all .n ≥ 1, .
gcd(Un , Vn ) = 1 or 2
and .gcd(Un , Vn ) = 1, if, in addition, Q is even. Proof By Lemma 2, no factor .d > 1 of Q may divide .Un . Hence, we see the result holds by Lemma 3. . First proof of Theorem 3. If .gcd(P, Q) > 1, then .gcd(P, P 2 −Q) = gcd(U2 , U3 ) > 1, while .Ugcd(2,3) = U1 = 1. Thus, regularity is necessary for U to be strongly divisible. We now show regularity is sufficient, and thus, we assume .gcd(P, Q) = 1. By Theorem 2, .Ugcd(m,n) | gcd(Um , Un ). Thus, assuming as we did prior to the theorem, that .m = qn + r, .0 ≤ r < n, by the Euclidean algorithm, all we need to show is that .G := gcd(Um , Un ) divides .Ur . Since .m − r = qn, we obtain by the subtraction formula (2.12) that V Um − 2Qr Uqn = Vm Ur .
. r
(2.50)
Since .G | Um and, by Theorem 2, .G | Uqn , we find that .G | Vm Ur . If gcd(Um , Vm ) = 1, then G is prime to .Vm so G divides .Ur . Thus, by Lemma 4, we may now assume Q odd and .gcd(Um , Vm ) = 2. Let us write .G = 2ν g with g odd. As g is prime to .Vm , .g | Ur . Thus, it remains to see that .2ν | Ur , assuming .ν ≥ 1. We use Lemma 1 when Q is odd. If P is odd, then as both .Um and .Un are even, m and n are multiples of 3. Thus, .3 | r. Hence, .2 | Ur . If P is even, then the evenness of .Um and .Un means that m and n are even. Thus, r is even and again .2 | Ur . There is nothing more to prove if .ν = 1. Hence, suppose .ν ≥ 2. Then .4 | Um . So .2 || Vm . But whatever the parity of P , .2 | Ur implies ν+1 .Vr is even. Hence, .2 divides the left-hand side of (2.50) and so .2ν | Ur . However, a simpler proof of the core part of Theorem 3, i.e., of the fact that P and Q are coprime implies .gcd(Um , Un ) = ±Ugcd(m,n) , is often achieved using identity (2.42). But we need another preliminary lemma. .
Lemma 5 If .gcd(P, Q) = 1, then .gcd(Un , Un+1 ) = 1 for all .n ≥ 0. Proof We proceed by induction. Indeed, .gcd(U0 , U1 ) = 1. Say .gcd(Un , Un+1 ) = 1 for some .n ≥ 0. If .gcd(Un+1 , Un+2 ) > 1, then some prime p divides .Un+1 and .Un+2 = P Un+1 −QUn . Thus, .p | QUn . But by Lemma 2, .p | Un+1 implies .p Q. Hence, .p | Un , which contradicts .gcd(Un , Un+1 ) = 1. . Second proof of Theorem 3. To prove that .gcd(Um , Un ) = ±Ugcd(m,n) , it suffices to show that .gcd(Um , Un ) = gcd(Um−n , Un ). But by (2.42), .
gcd(Um , Un ) = gcd(Un+1 Um−n − QUn Um−n−1 , Un ) = gcd(Un+1 Um−n , Un ) = gcd(Um−n , Un ),
2.3 General Divisibility Properties
25
where the last step follows from Lemma 5. Companion sequences are not divisibility sequences. Nevertheless, they satisfy a weaker divisibility condition given in Theorem 4. This theorem generalizes the well-known fact that for a and b integers and m odd, we have an + bn divides amn + bmn .
.
Theorem 4 Let V be a companion Lucas sequence. Then m odd =⇒ Vn | Vmn .
.
Proof By (2.33), all terms of the sum appearing on the right-hand side of . (2.36) are integers. Hence, for m odd, we see that .Vn divides .Vmn . Second proof of Theorem 4. We can also wrestle out a proof from the multiplication formula (2.29). Indeed, (2.29) tells us that .Vn divides .2m−1 Vmn . If .Vn is odd, then .Vn | Vmn . If .Vn is even, then either P is even, or both P and Q are odd by Lemma 1. If P is even, then .4 | D so that each term of the sum (2.29) being a multiple of .Dk Vnm−2k−1 Vn is a multiple of .4k 2m−2k−1 Vn = 2m−1 Vn . If P Q is odd, then, by Lemma 1, .3 | n and .2 | Un . But each term of the right-hand side sum of (2.29) contains the factor .Un2k Vnm−2k−1 Vn which is divisible by .2m−1 Vn . Third proof of Theorem 4. Using congruences in the ring of integers .O of the root field .Q(α) and bearing in mind that .O ∩ Q = Z, the proof is simple. Indeed, .Vn = αn + β n =⇒ αn ≡ −β n (mod Vn ). Raising the congruence to the odd mth power, we obtain .αmn ≡ −β mn (mod Vn ). That is, .Vn | Vmn . Fourth proof of Theorem 4. By Galois theory, any symmetric polynomial expression in the algebraic integers .x = αn and .y = β n must be a rational integer. Now V
. mn
= xm + y m = xm − (−y)m m−1 m−1 = x − (−y) xm−1−i (−y)i = Vn (−1)i xm−1−i y i . i=0
i=0
m−1 Since .(−1)i = (−1)m−1−i , the sum . i=0 (−1)i xm−1−i y i is a symmetric polynomial in x and y. Thus, .Vn | Vmn . There is also a weaker form of Theorem 3 which applies to companion sequences when we consider indices m and n that belong to the same 2-adic class, i.e., that have the same 2-adic valuation. Theorem 5 Let .gcd(P, Q) = 1, .m ≥ n ≥ 1. Then m ∼2 n =⇒ gcd(Vm , Vn ) = |Vgcd(m,n) |.
.
26
2 Basic Theory of the Lucas Sequences
We postpone the proof of Theorem 5 till Sect. 2.9, where it is a direct consequence of Corollary 30 and of the fact that no regular prime dividing Q may divide any V term. It is often useful to be aware that Theorem 3 remains nearly true when gcd(P, Q) > 0. A prime p is said to be regular if and only if .p gcd(P, Q). A prime that divides .gcd(P, Q) is called special.
.
Lemma 6 Suppose p is a regular prime. Then either .p Q, or .p | Q and does not divide any .Un , .n ≥ 1. Proof If .p | Q, then .p P since p is regular. Therefore, as seen in Lemma 2, Un ≡ P n−1 (mod p). The conclusion follows. .
.
Lemma 7 If .p Q, then .gcd(Un , Un+1 ) is prime to p for all .n ≥ 1. Proof This follows by induction for .p U1 and if .p gcd(Un , Un+1 ), then p gcd(Un+1 , Un+2 ). Indeed, if .p | Un+1 and .p | Un+2 , then .p | P Un+1 − QUn , . which implies .p | Un and leads to a contradiction.
.
Theorem 6 Let .U (P, Q) be a fundamental Lucas sequence and p be a regular prime. Then for all .m ≥ n > 0, we have .
gcd(Um , Un ) ∼ Ugcd(m,n)
(base p).
(2.51)
Proof Suppose .p | Q. Then no .Un , .n > 0, is divisible by p by Lemma 6. Hence, (2.51) holds. Thus, assume .p Q. Because .Ugcd(m,n) divides .Um and .Un , we find that .νp (Ugcd(m,n) ) ≤ νp (gcd(Um , Un )). So it suffices to see that α α .p | gcd(Um , Un ) implies .p | Um−n . As in our second proof of Theorem 3, we use identity (2.42) by which .pα | Un+1 Um−n . By Lemma 7, .p Un+1 . Thus, α .p | Um−n . . Corollary 7 If . ≥ 2 is an integer prime to Q, then for all .m ≥ n > 0, | gcd(Um , Un ) ⇐⇒ | Ugcd(m,n) .
.
Proof By the hypothesis, all prime divisors of . are regular. So by Theorem 6, if .p | , then the p-adic valuations of .gcd(Um , Un ) and of .Ugcd(m,n) are . identical. Thus, the corollary must hold. Definition 1 (Rank of appearance) Let .m ≥ 2 be an integer. We define the rank, or the rank of appearance of m in U , denoted as .ρ = ρU (m), to be the least positive index t such that .m | Ut , whenever such an integer .ρ exists.† †
Lucas used the letter .ω for the rank, maybe, or maybe not, in connection with the period of elliptic functions. We prefer .ρ, the Greek r, for rank and reserve the Roman r for a variable name.
2.4 Divisibility of Un by Powers of an Odd Prime
27
Lucas called it in French le rang d’apparition de m, and the French word “apparition” has been—and still is—widely in use among English writers. However, in English, more so than in French, the word “apparition” has a ghostly or miraculous connotation which is best to avoid: There is nothing supernatural about how integers divide terms of Lucas sequences. The rank .ρ is sometimes called the entry point of m in U . In this case, the letter z often denotes the entry point. Lemma 8 If .m ≥ 2 is an integer coprime to Q, then the rank .ρ(m) exists. Proof We need to show the existence of a positive integer t such that .Ut ≡ 0 (mod m). The sequence .(Un (mod m)) may only take at most .m2 distinct pairs of consecutive values. Therefore, from some point on, it must repeat itself going forward and be periodic since .U (mod m) is determined by two consecutive values of .(Un (mod m)). However, because .gcd(Q, m) = 1, the inverse of .Q (mod m) is well defined, and the recurrence .(Un (mod m)) may be run backward as well as forward. Indeed, .U−(n+2) = Q−1 P U−(n+1) − Q−1 U−n . Thus, it is fully periodic over .Z. Since .U0 = 0, the value .0 (mod m) must repeat itself in both directions. In particular, there is a minimal .t > 0 for which .m | Ut . . We now establish an important theorem concerning .ρ(m). This theorem does not bear a traditional name, but we refer to it as the law of regular division since it says that a regular divisor m divides the terms of the sequence U precisely every .ρ term. Theorem 8 If .m ≥ 2 is prime to Q of rank .ρ, then m | Un ⇐⇒ ρ | n.
.
Proof Clearly, .m | Un if and only if .m | gcd(Un , Uρ ). By Corollary 7, this occurs if and only if .m | Ugcd(n,ρ) . By the definition of .ρ, .m | Ugcd(n, ρ) is true . if and only if .ρ = gcd(n, ρ), i.e., if and only if .ρ | n.
2.4 Divisibility of Un by Powers of an Odd Prime From Lemma 8, if .p Q is a prime, then we know all powers .pa , .a ≥ 1, do divide some terms of .U (P, Q). Moreover, we know which terms are divisible by a given prime power .pa once we know its rank by Theorem 8. In this section, we gather more information on the values of the ranks of primes and see precisely how the rank of a prime power .pa+1 relates to the rank .ρ(pa ) of the previous power .pa . If p is special, then p divides all .Un , .n ≥ 2. If .p | Q, but .p P , then no .Un , .n ≥ 1, is divisible by p by Lemma 6. To express the law of appearance for primes not dividing Q, we use the symbol . p to denote the Legendre character .(D | p). That is,
28
2 Basic Theory of the Lucas Sequences
⎧ ⎪ ⎨0, . p = (D | p) = 1, ⎪ ⎩ −1,
if p | D; if D is a nonzero square modulo p; if D is not a square modulo p.
(2.52)
We begin with a lemma. Lemma 9 If p is an odd prime, then U p ≡ p
.
(mod p)
and
Vp ≡ P
(mod p).
p Proof As the binomial coefficient . 2k+1 is divisible by p unless .k = (p−1)/2, p−1
p). This we obtain by setting .n = p in (2.40) that .2p−1 Up ≡ D 2 (mod implies .Up ≡ p (mod p). Similarly, (2.41) gives .2p−1 Vp ≡ p0 P p (mod p), . yielding .Vp ≡ P (mod p). Remark 6 Rather than using Equations (2.40) and (2.41), we may use congruences in the ring of integers .O of the field .Q(α). Indeed, .Vp = αp + β p ≡ (α + β)p = P p ≡ P (mod pO) implying .Vp ≡ P (mod p) since .Vp and P are rational integers. Likewise, assuming .p D, we find that Up ≡
.
p−1 (α − β)p = (α − β)p−1 = D 2 ≡ p α−β
(mod pO).
Theorem 9 (Law of appearance for primes) Suppose .p Q is a prime of rank .ρ. Then we find that if p ≥ 3, then ρ divides p − p , and 2, if 2 | P ; if p = 2, then ρ = 3, if P is odd.
.
Proof The case .p = 2 is immediate as .U2 = P and .U3 = P 2 − Q. Suppose p is an odd prime. We are about to see that .p | Up−p . If . p = 0, then .p | Up by Lemma 9. If . p = ±1, then Equation (2.12) gives .2Qp Up−p = Up Vp −Up Vp . That is, for . p = 1, .2QUp−1 = P Up −Vp ≡ P p −P = 0 (mod p), by Lemma 9. For . p = −1, we get .2Q−1 Up+1 = Up V−1 − U−1 Vp , which when multiplied by Q yields .2Up+1 = Up V1 + Vp ≡ p P + P = 0 (mod p), by (2.7) and Lemma 9. . Thus, by Theorem 8, we conclude that .ρ divides .p − p . Remark 7 The content of Theorem 9 can be found in [12, Sect. XXV] which Lucas titled “De l’apparition des nombres premiers . . . ” So Theorem 9 is Lucas’ so-called law of appearance. Remark 8 One may view the law of appearance for primes as a near generalization of Fermat’s little theorem, that is, of the Fermat congruence .ap−1 ≡ 1 (mod p), for integers a such that .p a. If .U = U (a + 1, a) and .p a(a − 1) is an odd prime, then .D = (a − 1)2 , . p = 1, and the law of appearance implies
2.4 Divisibility of Un by Powers of an Odd Prime
29
that .ap−1 ≡ 1 (mod p). (Since there is hardly anything to prove if .p = 2 and a is odd, or if p is odd and .p | a − 1, this law may actually be viewed as a full generalization of the Fermat congruence.) Remark 9 The law of appearance when . p = −1 may be seen via algebraic number theory. The non-trivial automorphism .σ of .Q(α)/Q, which sends .α → β and vice versa, is the Frobenius automorphism of .pO/p. That is, p .σ(x) ≡ x (mod pO) for all .x ∈ O. Thus, .Q = αβ ≡ ααp ≡ β p β (mod pO). But, by (2.5), .αp+1 ≡ β p+1 (mod pO) holds iff .p | Up+1 . We now turn to the appearance of prime powers. Lemma 10 For m and n nonnegative integers, we find that 2m−1 Umn ≡ mUn Vnm−1
.
(mod Un3 ).
Proof This is an immediate consequence of the multiplication formula (2.28) . since modulo .Un3 , only the term corresponding to .k = 0 survives. We are now ready for a famous lemma which, essentially, asserts that the appearance of higher powers of p in .Umρ is governed by the power of p in m. Lemma 11 (Lifting-the-exponent lemma) Suppose .p 2Q is a prime that divides .Un . Then .Umn ∼ mUn (base p). Proof We proceed by induction on . where .m ∼p p . If . = 0 or . = 1, then we can downgrade the modulus in Lemma 10 to .p2 Un and obtain that 2m−1 Umn ≡ mUn Vnm−1
.
(mod p2 Un ).
By Lemma 3, .p Vnm−1 . Thus, .νp (mUn Vnm−1 ) = νp (mUn ) < νp (p2 Un ) so that .Umn ∼p mUn . Thus, the lemma holds for . ≤ 1. In particular, .Upn ∼p pUn for all .n ≥ 0. Assume the lemma holds for some . ≥ 1. Put .m = kp+1 , .p k. Then, as .Upn ∼p pUn , we may use the inductive hypothesis and write that Umn = Ukp (pn) ∼ kp Upn ∼ kp+1 Un = mUn
.
(base p).
.
Remark 10 Lemma 11 is essentially what Lucas [12, Sect. XIII] twice called “la loi de la r´ep´etition,” which translates into “the law of the repetition” (of the prime numbers). Thus, in English, for many authors who have worked with the Lucas functions, Lemma 11 is referred to as the law of repetition. Note that on [12, p. 210] of that same Sect. 13, Lucas also refers to this phenomenon as the “appearance of the successive powers of prime numbers.” Example 10 In the Fibonacci sequence, .ρ(3) = 4. Thus, .3 | Fn if and only . if .4 | n. Moreover, .F4m ∼3 mF4 = 3m. For instance, .33 || F36 .
30
2 Basic Theory of the Lucas Sequences
Remark 11 Theorem 9 and Lemma 11 provide respective proofs that a prime p Q possesses a rank and that this is equally true of all its powers. These proofs are independent of the argument used in Lemma 8. Indeed, Theorem 9 shows that .p | Up−p , and the proof of Lemma 11 does not refer to Lemma 8.
.
Corollary 11 Suppose .p 2Q is a prime of rank .ρ in U , and assume .pν || Uρ . Then ρ, if 1 ≤ a ≤ ν; a .ρU (p ) = a−ν p ρ, if a > ν. Proof If .1 ≤ a ≤ ν, then no term .Ut with .0 < t < ρ is divisible by p. Thus, ρ(pa ) = ρ. If .a > ν, then, by Lemma 11, the least t such that .pa divides .Ut is .pa−ν ρ. .
.
Definition 2 (Rank exponent of a prime) Given .p Q of rank .ρ, we define the rank exponent .ν of p as the full exponent of p in .Uρ . That is, as in Corollary 11, .pν || Uρ . Note that if .Uρ = 0, then we agree that .ν = +∞. Remark 12 Given a prime p, it is easy to construct a Lucas sequence .U (P, Q) such that the rank exponent .ν of p is as large as we wish. A cheesy solution is to choose .P = pν . Another would be to pick P prime to p and choose 2 ν ν .Q = P − p so that .ρ(p) = ρ(p ) = 3. In the particular case of the Fibonacci sequence, no prime p has yet been found for which .ν ≥ 2. There is a folk conjecture, sometimes referred to as the Wall-Sun-Sun conjecture, which asserts that .p2 Fρ(p) for all primes p. See [8] for an extensive bibliography on this conjecture. Although all primes . 0 and .b = ν2 (Q) = 0.
34
2 Basic Theory of the Lucas Sequences
Using Theorems 13 and 14, we state a corollary analogous to Corollary 11. Corollary 15 Suppose .2 Q. Let .ρ and .ν, respectively, denote the rank and the rank exponent of 2. If P is even or if .Q ≡ 1 (mod 4), then ρ, if 1 ≤ a ≤ ν; a .ρ(2 ) = a−ν 2 ρ, if a ≥ ν. If P is odd and .Q ≡ −1 (mod 4), then, with .ν∗ = ν2 (U6 ) = 1+ν2 (P 2 −3Q) ≥ 3, we find that ⎧ ⎪ if a = 1; ⎨3, a .ρ(2 ) = 6, if 2 ≤ a ≤ ν∗ ; ⎪ ⎩ a−ν∗ · 6, if a ≥ ν∗ . 2
2.6 Composite Integers Dividing U and Their Rank By Lemma 8, we know all integers prime to Q admit a rank of appearance. Also, from Theorem 8, given an integer .m ≥ 2 prime to Q, we know m divides .Un if and only if n is a multiple of the rank of m. Moreover, if some prime factor of m divides Q, but not P , then by Lemma 6, no .Un , with .n ≥ 1, is divisible by m. We have gathered information on the rank of primes and prime powers in the previous two sections. We now state a theorem on the rank of m, m prime to Q, in terms of the ranks of its prime factors. Theorem
r 16 Let .m ≥ 2 be an integer prime to Q of rank .ρ in .U (P, Q). If m = i=1 pai i , then a1 a2 ar .ρ = lcm ρ(p1 ), ρ(p2 ), . . . , ρ(pr ) .
.
Proof Let M be the least common multiple of the ranks .ρ(pai i ), .1 ≤ i ≤ r. By Theorem 8, .m | Un ⇐⇒ ρ | n. But .m | Un if and only if .pai i | Un for all .1 ≤ i ≤ r. Hence, by Theorem 8 again, m | Un ⇐⇒ ρ(pai i ) | n ⇐⇒ M | n.
.
Hence, .ρ = M , i.e., M is the rank of m.
(all i, 1 ≤ i ≤ r)
.
Example 17 With respect to the Fibonacci sequence, .ρ(3) = 4 and .ρ(7) = 8 so .ρ(21) = lcm(4, 8) = 8. Indeed, .F8 = 21. .
2.7 Divisibility of Vn by Powers of an Odd Prime
35
Application 18 Prove that for all .n ≥ 1, .Pn2 | P m iff .nPn | m, where a .P = U (2, −1) is the so-called Pell sequence. Suppose . pa || Pn p is the prime a factorization of .Pn . Note that if .p || Pn , then .a ≥ ν, where .ν is the rank exponent of p. By Theorem 16 and Corollaries 11 and 15, a a−ν · lcmp|Pn ρ(p) . .ρ(Pn ) = lcmpa || Pn ρ(p ) = p p|Pn
Hence, ρ(Pn2 ) =
.
p|Pn
=
p2a−ν · lcmp|Pn ρ(p) a−ν · lcmp|Pn ρ(p) pa · p
p|Pn
p|Pn
= Pn · ρ(Pn ) = Pn · n. Indeed, the fact that for .n ≥ 2, .Pn > 1 and .Pn is an increasing function of n implies that .ρ(Pn ) = n. Hence, .Pn2 | Pm if and only if .nPn | m, by Theorem 8. The case .n = 1 is trivial to check. (If .n ≥ 3, then .Fn2 | Fm iff .nFn | m, where .Fk designates the kth Fibonacci number. This property is a lemma famously . used by Matijasevich in his solution to Hilbert’s tenth problem.)
2.7 Divisibility of Vn by Powers of an Odd Prime If .{U, V } is a pair of Lucas sequences, then, while all primes not dividing Q divide some terms of U , there are usually infinitely many primes which do not divide any term of the companion sequence V . Actually, the infinite collection of primes which do not divide any .Vn represents a positive “proportion” of the primes. Precise theorems on the size of the set of primes that divide a companion Lucas sequence will be stated in Chap. 9. As an example, consider the sequence of Lucas numbers L, where .Ln = Vn (1, −1). We find that modulo 5 L:
.
2, 1, 3, 4, 2, 1, . . .
That is, .L (mod 5) has period 4, and the residue .0 (mod 5) never appears. Thus, for all .n ≥ 0, .5 Ln . Similarly, for .p = 13, we find that modulo 13 L:
.
2, 1, 3, 4, −6, −2, 5, 3, −5, −2, 6, 4, −3, 1, −2, −1, . . .
Since .L14 ≡ −L0 = −2 (mod 13) and .L15 ≡ −L1 = −1 (mod 13) and 13 Ln for .0 ≤ n ≤ 13, there can never be a value of .n ≥ 0 such that .13 | Ln .
.
36
2 Basic Theory of the Lucas Sequences
In fact, in 1985, Lagarias [9] showed that on average, exactly one out of three primes does not divide any Lucas number. Let us begin by defining the V -rank of a generic integer m. Definition 3 (V -rank) Let .m ≥ 2 be an integer. We define the V -rank of m, or the rank of appearance of m in V , denoted as .σ, or .σ(m), to be, if it exists, the least positive index t such that .m | Vt . We may occasionally use the alternate notation .ρV or .ρV (m). We are about to see that for all primes not dividing 2Q, there is a very simple criterion for the V -rank to exist. Theorem 19 Let .p 2Q be a prime of rank .ρ. Let .σ denote the V -rank of p. Then .σ exists ⇐⇒ ρ is even, in which case .σ = ρ/2. Moreover, the p-adic valuations of .Uρ and .Vσ are the same. Proof We begin with the proof of the converse. Thus, we suppose .ρ is even, say .ρ = 2ρ∗ . Then .p Uρ∗ , but .p | Uρ . Since by (2.23) .Uρ = Uρ∗ Vρ∗ , p must divide .Vρ∗ . Thus, .σ ≤ ρ∗ exists. Moreover, by (2.23) again, as .p | Vσ , .p | U2σ . Hence, .ρ | 2σ. That is, .ρ∗ | σ. Thus, .σ = ρ∗ . Now assume that .σ exists. Then .p | Vσ implies that .p | U2σ . Hence, .ρ | 2σ. By Lemma 3 and since .p 2Q, .p gcd(Uσ , Vσ ). So .p Uσ . But .ρ | 2σ and .ρ σ says that .ρ is even. (Therefore, by the proof of the converse, .σ = ρ/2.) . That .Uρ ∼p Vσ follows from the identity .Uρ = Uσ Vσ and .p Uσ . It is easy to verify that 5 and 13 are the least two primes with no L-rank, where .L = V (1, −1). Their respective ranks in .F = U (1, −1), 5 and 7, are indeed odd. Theorem 19 also holds for prime powers. That is, the V -rank of the power of a prime p not dividing 2Q exists if and only if the rank of this prime power is even. This occurs if and only if .σ(p) exists. Corollary 20 Let .p 2Q be a prime of rank .ρ and rank exponent .ν. Suppose a ≥ 1 is an integer. Then
.
σ(pa ) exists
.
⇐⇒
ρ is even.
Moreover, if .ρ is even, then σ(pa ) =
.
1 1 ρU (pa ) = ρp(a−ν)[a>ν] , 2 2
where .[−] denotes the Iverson symbol. Also, the p-adic valuations of .Uρ(pa ) and .Vσ(pa ) are equal. .
2.7 Divisibility of Vn by Powers of an Odd Prime
37
Proof We can clone the proof of Theorem 19, once we observe, by Corollary 11, that .ρ(pa ) = ρp , where . := (a − ν)[a > ν], and thus that .ρ is even . if and only if .ρ(pa ) is even. Alternatively, we can state part of the previous result in the manner of Corollary 11, as follows: Corollary 21 Suppose .p 2DQ is a prime and .σ(p) exists. Then σ, if 1 ≤ a ≤ ν; a .σ(p ) = a−ν p σ, if a > ν, where .pν || Vσ .
.
Odd primes p dividing D have no V -rank by Theorem 9 since their rank ρ, equal to p, is odd. Hence, they are excluded twice from consideration in the statement of Corollary 21. For the powers of an odd prime with even rank, we may state a law of regular division analogous to Theorem 8.
.
Theorem 22 Given a prime .p 2Q of even rank and an integer .a ≥ 1, we have for all .n ≥ 1 pa | Vn ⇐⇒ n = (2k + 1)σ(pa ),
.
for some .k ≥ 0. Proof By the double-angle formula (2.23) and Lemma 4, .pa | Vn implies that a a a a .p | U2n , but .p Un . Hence, .ρ(p ) | 2n, but .ρ(p ) n. Since, by Corollary 20, a a a a .ρ(p ) = 2σ(p ), we see that .σ(p ) | n, but .2σ(p ) n. It follows that n is an a odd multiple of .σ(p ). . For the converse, we only need to invoke Theorem 4. Corollary 23 Suppose .p 2Q is prime and m and n are positive integers. Then .m ∼2 n =⇒ gcd(Vm , Vn ) ∼p Vgcd(m,n) . Proof Say .pa | gcd(Vm , Vn ). Then, by Theorem 22, .m = (2k + 1)σ(pa ) and a a .n = (2+1)σ(p ) for some nonnegative k and .. Thus, .σ(p ) divides .gcd(m, n) a and .σ(p ) ∼2 m ∼2 n ∼2 gcd(m, n). Therefore, by Theorem 4, .pa | Vgcd(m,n) . If .pa | Vgcd(m,n) , then, by Theorem 4, .pa divides both .Vm and .Vn since m . and n are odd multiples of .gcd(m, n). Regular primes dividing Q cannot divide any U term, so they cannot divide any V term by the double-angle formula. Thus, we now turn to the divisibility of V terms by powers of 2.
38
2 Basic Theory of the Lucas Sequences
2.8 Divisibility of Vn by Powers of 2 The parity of V terms was given in Lemma 1. But the behavior of the prime 2, when .2 Q, is radically different from the behavior of odd primes .p Q. Indeed, by Corollary 20, if p is odd and .σ(p) exists, then powers of p in V are unbounded. On the contrary, powers of 2 always remain bounded in a companion Lucas sequence, at least in the nondegenerate case. Theorem 24 Suppose Q is odd. If P is even, then, for all .n ≥ 0, V
. 2n
∼2
and
V2n+1 ∼ P
(base 2).
If P is odd, then we have .2 | Vt ⇐⇒ 3 | t. Moreover, for .n ≥ 0, = V6n+3 ∼ V3 ∼ P 2 − 3Q
V
. 3(2n+1)
and
V6n ∼ 2
(base 2).
Proof Suppose P is even. By Theorem 13, U2n+1 ∼2 1
.
and
U4n+2 ∼2 (2n + 1)P ∼2 P.
Since .V2n+1 U2n+1 = U4n+2 , we have .V2n+1 ∼2 U4n+2 ∼2 P . Also, .V2 = P 2 − 2Q ∼2 2 so that, by Lemma 12, .V2n ∼2 2 for all .n ≥ 0. Now suppose that P is odd. That .2 | Vt iff .3 | t was already observed in Lemma 1. Since .V3 = P (P 2 −3Q) and P is odd, .V3 ∼2 P 2 −3Q. Thus, if .Q ≡ 1 (mod 4), then .P 2 − 3Q ≡ 1 + Q ≡ 2 (mod 4), so .V3 ∼2 2. By Lemma 12, .V3n ∼2 2 for all .n ≥ 0. Suppose .Q ≡ −1 (mod 4). By Theorem 14, U3(2n+1) ∼2 2
.
and U6(2n+1) ∼2 (2n + 1)U6 .
In particular, .U3 ∼2 2. Therefore, 2V3 ∼ U3 V3 = U6 ∼ U6(2n+1) = U3(2n+1) V3(2n+1) ∼ 2V3(2n+1)
.
(base 2).
This implies .V3(2n+1) ∼2 V3 . Again, by Theorem 14, .U6n ∼2 nU6 . Hence, 2nU6 ∼ U12n = U6n V6n ∼ nU6 V6n
.
from which we see that .V6n ∼2 2.
(base 2),
.
Remark 18 The 2-adic valuation of V is simplest in two cases. If Q is odd and .P ≡ 2 (mod 4), then .Vn ∼2 2 for all .n ≥ 0. If P Q is odd with .Q ≡ 1 (mod 4), then .Vn ∼2 2, if .3 | n, and .Vn ∼2 1, if .3 n. We rephrase Theorem 24 as a law of appearance for powers of 2 in the next corollary. Note that Equation (2.55) is reminiscent of Theorem 22.
2.9 Composite Integers Dividing V
39
Corollary 25 Suppose Q is odd. Then, for .a ≥ 2, 1, if 4 | P and a ≤ ν2 (P ); a .σ(2 ) = 3, if P is odd, Q ≡ −1 (mod 4) and a ≤ ν2 (P 2 − 3Q), and 2a | Vn ⇐⇒ n = (2k + 1)σ(2a ),
.
(2.55)
for some .k ≥ 0. Moreover, if a exceeds, respectively, .ν2 (P ) or .ν2 (P 2 − 3Q), then .σ(2a ) does not exist. To complete the picture, we have for P even: .2 || Vn for all .n ≥ 0 if .P ≡ 2 (mod 4) or if n is even and .4 | P . For P odd, we have: .2 || V3n for all .n ≥ 0 if .Q ≡ 1 (mod 4) or if n is even and .Q ≡ −1 (mod 4). A result similar to Corollary 23 can be proved with respect to .p = 2. Corollary 26 Suppose Q is odd and m and n are positive integers. Then m ∼2 n =⇒ gcd(Vm , Vn ) ∼2 Vgcd(m,n) .
.
Proof We use Theorem 24 throughout. Say .2a | gcd(Vm , Vn ). Then .a ≤ M , where 2 .M := ν2 (P ) · [2 | P ] + ν2 (P − 3Q) · [2 P ] ≥ 1. (2.56) If .a ≥ 2, then we can, using (2.55), carry out the same reasoning as in the proof of Corollary 23 to prove our result. So assume .a ≤ 1. If .P ≡ 2 (mod 4), then all .Vt , .t ≥ 0, have 2-adic valuation 1. So the result holds. If .4 | P , then we only need to consider the case where m and n are both even; otherwise, .a ≥ 2. Thus, .a = 1. Hence, .2 || Vgcd(m,n) because .gcd(m, n) is even. So the result is true. Suppose P is odd. When .Q ≡ 1 (mod 4), all even V terms have 2-adic valuation equal to 1. Since .Vt is even iff .3 | t, we see that .2 || gcd(Vm , Vn ) iff .3 | gcd(m, n), which occurs iff .2 || Vgcd(m,n) . If .Q ≡ −1 (mod 4), then .2 || Vgcd(m,n) iff .6 | gcd(m, n), which occurs iff .Vm and .Vn are both even with 2-adic valuation 1. . Remark 19 It may be observed that if .4 | Vn for some .n ≥ 1, then .2M || Vn , where M was defined in (2.56). In fact, n is an odd multiple of .σ(4) = σ(2M ).
2.9 Composite Integers Dividing V We are now concerned with integers .m ≥ 2 that are divisors of a companion Lucas sequence V , i.e., such that .m | Vn for some .n ≥ 1, which we write .m | V . As mentioned earlier, the set of primes which do not divide V not only is most often infinite but contains a positive proportion of the primes. Therefore, the set of integers whose prime factors all divide V must have a 0-asymptotic density within the set of integers. A fortiori, if .DV denotes
40
2 Basic Theory of the Lucas Sequences
the divisor set of V , i.e., if .DV := {m; m | V }, then .#DV (x) = o(x). That is, few integers divide V . Actually, most integers with prime factors all dividing V are not in .DV as Theorem 27 will suggest. In fact, when .α and .β are coprime integers, .α/β = ±1, Moree’s work [14, Theorem 5] provides estimates for .#DV (x). In particular, if .α/β ∈ Q2 , then .#DV (x) is asymptotically equivalent to .cx/ log2/3 x for some positive constant c, as .x → ∞. The next theorem gives an idea of how stringent conditions are for a generic integer to divide a companion Lucas sequence.
s Theorem 27 Suppose .m ≥ 3, .gcd(m, Q) = 1, and .m = 2a i=1 pbi i is the factorization of m into prime factors .2 < p1 < p2 < · · · < ps , where .a ≥ 0, νi .s ≥ 0, and .bi ≥ 1. Let .ρi denote the rank of .pi and .pi || Uρi . Then .σ(m), the V -rank of m, exists if and only if the three conditions below are satisfied: • ν2 (ρ1 ) = ν2 (ρ2 ) = · · · = ν2 (ρs ) := ν∗ ≥ 1, ν2 (P ), if P is even; • a≤ 2 ν2 (P − 3Q), if P is odd,
.
•
ν∗ = 1, if a ≥ 2.
In case of existence, σ(m) =
.
1 lcm(ρ0 , ρ1 pe11 , ρ2 pe22 , . . . , ρs pess ), 2
where ρ =
. 0
6, 2,
(2.57)
if P is odd and a > 0; otherwise,
and .ei = max{0, bi − νi }. Moreover, for all .n > 0, m | Vn ⇐⇒ n = (2k + 1)σ(m), for some k ≥ 0.
.
Proof The existence of a .ν∗ ≥ 1 such that ν = ν2 (ρ1 ) = ν2 (ρ2 ) = · · · = ν2 (ρs )
. ∗
(2.58)
is necessary for .σ(m) to exist. Indeed, m divides V implies all its odd prime factors divide V . But by Theorem 19, .pi divides V iff .ρi is even. Note that, by Corollary 21, .p | V implies .pb | V for all .b ≥ 1. Now, in order to find an bi .n ≥ 1 such that all .pi simultaneously divide .Vn , n must be an odd multiple bi of all .σ(pi ). But .σ(pbi i ) ∼2 σ(pi ). Hence, all .σ(pi ) must have the same 2-adic valuation. Since .ρ(pi ) = 2σ(pi ), there is an .ν∗ ≥ 1 such that (2.58) holds. If m is odd, or if m is even with .a = 1 and P even, in which case .2 | Vn for all n, then the condition (2.58) is sufficient. Moreover, n is an odd multiple of all .σ(pbi i ) if and only if n is an odd multiple of the least common multiple of all .σ(pbi i ), which must be .σ(m). Hence, .σ(m) is given by (2.57) in those cases.
2.9 Composite Integers Dividing V
41
Note that if .a ≥ 1 with P odd, then .2 | Vn iff .3 | n. So we must make sure that .3 | σ(m) which explains the presence of .ρ0 = 6 in (2.57). If .a ≥ 2, then, by Corollary 25, a must be bounded above either by .ν2 (P ), if .4 | P , or by 2 a .ν2 (P − 3Q), if P is odd, in order to have V terms divisible by .2 . Moreover, a a by (2.55), n must be an odd multiple of .σ(2 ). Since .σ(2 ) is either 1 or 3, a .σ(2 ) is odd, and we must have .ν∗ = 1 in order for m to divide .Vn . . Example 28 Consider .L = V (1, −1). Then .m = 8 L since .a = 3, .P 2 −3Q = 4, and .a > ν2 (P 2 − 3Q). However, .m = 4 divides L. Here, .ρ0 = 6, .σ(4) = 3, and .4 | Ln iff .n = 6k + 3 for some .k ≥ 0. But .21 = 3 · 7 L because .ρ(7) = 8 has a 2-adic valuation greater than .ρ(3) = 4. Now .319 = 11 · 29 | L, because .ρ(11) = 10 and .ρ(29) = 14 are both even with 2-adic valuation 1. Hence, .σ(319) = 35 and .319 | L70k+35 for all .k ≥ 0. Similarly, .1276 = 4 · 319 divides . L because .ν∗ = 1. But .28 L since .ν∗ = ν2 (ρ(7)) = 3 > 1. We state a corollary of Theorem 27, which is only a particular case of that theorem, but with a simpler statement. Corollary 29 Suppose .m ≥ 3, coprime to Q, is either odd or such that .2 || m and has .s ≥ 1 odd prime factors .p1 , . . . , ps . Let .ρi denote the rank of .pi . Then σ(m) exists ⇐⇒ ν2 (ρ1 ) = ν2 (ρ2 ) = · · · = ν2 (ρs ) ≥ 1,
.
where, in case of existence, .σ(m) =
ρ(m) 2 .
Moreover, for all .n > 0,
m | Vn ⇐⇒ n = (2k + 1)σ(m), for some k ≥ 0.
.
Remark 20 We observe that if m admits a V -rank .σ(m), then, in fact, we always find that ρ(m) . .σ(m) = 2 Indeed, if .m = 2a b, b odd, .2 ≤ a ≤ M , where M was defined in (2.56), then 2, if 2 | P ; a .ρ(2 ) = 6, if 2 P. Hence, .ρ(m) = lcm(ρ(2a ), ρ(b)) = 2 lcm(σ(2a ), σ(b)) = 2σ(m). The next result is a combination of Corollaries 23 and 26. Corollary 30 Let .p Q be a prime and m and n be two positive integers. Then .m ∼2 n =⇒ gcd(Vm , Vn ) ∼p Vgcd(m,n) . Before ending the section, we single out, without proof, a few corollaries which are immediate consequences of the preceding theorems.
42
2 Basic Theory of the Lucas Sequences
Corollary 31 If .m ≥ 3, .gcd(m, Q) = 1, then m | Vn =⇒ 2
.
n . σ(m)
Corollary 32 If . is a product of regular primes and . | Vm , then n ∼2 m =⇒ gcd(, Vn ) = 1.
.
Corollary 33 If .1 | Vm and .2 | Vn , where .m ∼2 n and .gcd(1 , 2 ) = 1, then | Vlcm(m,n) . .
. 1 2
Corollary 34 If .1 | Vm and .2 | Vn with .m ∼2 n, .1 ≥ 3, .2 ≥ 3, and gcd(1 2 , Q) = 1, then .1 2 Vk for all .k ≥ 0. .
.
Corollary 35 If .m ≥ 3, .gcd(m, Q) = 1, and .2 ρ(m), then .σ(m) cannot . exist.
2.10 Euler’s Criterion for Lucas Sequences Euler’s criterion says that if p is an odd prime and a is an integer prime to p−1 p, then a is a square modulo p if and only if .a 2 ≡ 1 (mod p). That is, if U is the Lucas sequence with parameters .P = a + 1 and .Q = a, then the rank .ρU (p) divides . p−1 2 , halfway through the maximal potential rank .p − 1. The next theorem, much as the law of appearance generalized Fermat’s little theorem, generalizes the classical Euler criterion. Interestingly, it is also valid when . p = −1, where . p was defined in (2.52). In the sequel, .(Q | p) denotes the Legendre character of Q modulo p. Theorem 36 (Euler’s criterion for Lucas sequences) Suppose U is a fundamental Lucas sequence with parameters P and Q and p is a prime not dividing 2QD. Then p | U p−p ⇐⇒ (Q | p) = 1.
.
2
We begin with two lemmas. Lemma 15 If .p 2QD is prime, then V
. p−p
≡ 2Q
1−p 2
(mod p).
Proof As .p D, . p = ±1. Case 1. . p = 1. Using the subtraction formula (2.13), we see that 2QVp−1 = Vp V1 − DUp U1 ≡ P 2 − D = 4Q
.
(mod p),
2.11 Degenerate Lucas Sequences
43
where the congruence is obtained with the help of Lemma 9. This yields V ≡ 2 (mod p). (Alternatively, when . p = 1, we may view .α (mod p) and p−1 .β (mod p) as belonging to the finite field .Fp . Thus, .Vp−1 = α + β p−1 ≡ 1 + 1 = 2 (mod p).) Case 2. . p = −1. Using the addition formula (2.11) and Lemma 9, we find that . p−1
2Vp+1 = Vp V1 + DUp U1 ≡ P 2 − D = 4Q
.
(mod p),
yielding .Vp+1 ≡ 2Q (mod p). (An alternate way of seeing this is that, by Remark 9, we have V
. p+1
= αp+1 + β p+1 = ααp + ββ p ≡ αβ + βα = 2Q
(mod p).)
Lemma 16 If .p 2QD is prime, then (Q | p) = −1 ⇐⇒ p | V p−p .
.
2
Proof Using identity (2.24) and Lemma 15, we have 2 V p− p = Vp−p + 2Q
.
p−p 2
2
≡ 2Q
p−p
1−p 2
+ 2Q 2 1−p p−1 ≡ 2Q 2 1 + Q 2 which yields the lemma since .Q
p−1 2
(mod p),
≡ (Q | p) (mod p).
.
Proof of Theorem 36. By the law of appearance for primes, .p | Up−p . But Up−p = U p−p V p−p , and p cannot divide both .U p−p and .V p−p by Lemma 3.
.
2
2
2
2
Hence, .p | U p−p if and only if .p V p−p , which occurs, since .p Q, if and 2
only if .(Q | p) = 1, by Lemma 16.
2
Remark 21 Here is a direct proof of this criterion using algebraic number theory. If . p = 1, then .α (mod p) and .β (mod p) belong to .Fp . Thus, both p−1 p−1 p−1 p−1 p−1 and .β 2 are in .{±1}. Hence, .Q 2 = α 2 β 2 ≡ 1 (mod p) iff .α 2 p−1 p−1 ≡ β 2 (mod p), which holds, as .p D, iff .p | U p−1 . If . p = −1, .α 2 2 then the non-trivial automorphism .σ of .Q(α)/Q sends .α → β. As seen in p+1 Remark 9, .Q ≡ αp+1 ≡ β p+1 (mod pO). Thus, .(Q | p) = 1 iff both .α 2 and p+1 p+1 p+1 p+1 are in .Fp . Hence, .(Q | p) = 1 iff .α 2 ≡ σ(α 2 ) = β 2 (mod pO), .β 2 which is true iff .p | U p+1 . 2
2.11 Degenerate Lucas Sequences Consider the terms of the Lucas sequence .U (−1, 1)
44
2 Basic Theory of the Lucas Sequences
0, 1, −1, 0, 1, −1, 0, 1, −1, . . . , 0, 1, −1, . . .
.
This sequence presents little interest. Moreover, all the terms .U3k are zero. It is often necessary to remove Lucas sequences having a zero term from consideration, particularly when division is involved. Example 37 Besides .U (−1, 1) with .U3 = 0, the terms of .U (2, 2) are, with k ≥ 0,
.
0, 1, 2, 2, 0, −4, −8, −8, 0, 16, 32, 32, 0, . . . , 0, (−4)k , 2(−4)k , 2(−4)k , . . .
.
and .U4 = 0. Also the terms of .U (3, 3) are .
0, 1, 3, 6, 9, 9, 0, −33 , −34 , −2 · 34 , −35 , −35 , . . . , 0,(−1)k 33k ,(−1)k 33k+1 ,(−1)k 33k , (−1)k 2 · 33k+1 , (−1)k 33k+2 , (−1)k 33k+2 , . . .
with .k ≥ 0. Here, the first zero term is .U6 .
.
Definition 4 (Degenerate Lucas sequence) We say that a Lucas sequence .U (P, Q) is degenerate, or that the pair .{U, V } is degenerate, whenever some U term with positive index is zero, i.e., if there exists an .n ≥ 3 such that .Un = 0. We seek simple characterizations for degenerate Lucas sequences and begin with an easy lemma. Lemma 17 The only roots of unity lying in a quadratic number field have order 1, 2, 3, 4, or 6. Proof Say .ζ is a primitive root of unity of order n, i.e., the least integer .k ≥ 1 such that .ζ k = 1 is n. Then it is well known that the cyclotomic extension .Q(ζ) of .Q has degree .ϕ(n), where .ϕ is the Euler totient function. As .ζ lies in a quadratic field, we need to have .ϕ(n) ≤ 2. If the prime power .pa divides n, then .pa−1 (p − 1) | ϕ(n). Thus, the only acceptable prime factors are 2 and 3, 12. . i.e., .n = 2a 3b with .a ≤ 2 and .b ≤ 1, .n = Theorem 38 The sequence .U (P, Q) is degenerate if and only if the following equivalent conditions are satisfied. (i) The ratio .α/β is a root of unity of order 3, 4, or 6. (ii) .U4 U6 = 0. (iii) .U12 = 0. (iv) .P 2 = Q, .P 2 = 2Q, or .P 2 = 3Q. Proof From (2.6) and .Q = αβ = 0, we see that .Un = 0, for all .n ≥ 1 in n −β n case .α = β. If .α = β, then .Un = αα−β . Thus, .Un = 0 iff .(α/β)n = 1. √ Since .α/β belongs to the quadratic field .Q( D) and is a root of unity, we see from Lemma 17 that n is limited to the values 1, 2, 3, 4, or 6. Since
2.12 Divisibility by Powers of a Special Prime
45
U1 = 1 and .U2 = P = 0, n must be 3, 4, or 6. All three possibilities occur as seen in Example 37. This proves condition .(i), but also the equivalent condition .U3 U4 U6 = 0. But since U is a divisible sequence, .U3 = 0 implies .U6 = 0. Hence, condition .(ii) is necessary and sufficient. Similarly, .U4 = 0 and .U6 = 0 each imply .U12 = 0. Conversely, since .U12 cannot be the first positive-indexed zero term of a U sequence, .U12 = 0 implies .U4 , or .U6 is zero. The equivalence with condition .(iv) is obtained by noting that .U3 = P 2 − Q, 2 2 .U4 = P (P − 2Q), and .U6 = U2 U3 (P − 3Q). . .
Since a number of results are established under both the nondegeneracy and the regularity hypotheses, it is convenient to identify explicitly which sequences are actually excluded from consideration. Corollary 39 There are only two regular degenerate Lucas sequences .U (P, Q). They correspond to .P = ±1 and .Q = 1. . Proof It suffices to note that in the fourth condition of Theorem 38, the two possibilities .P 2 = 2Q, or .P 2 = 3Q, cannot occur when .gcd(P, Q) = 1. The condition .P 2 = Q and .gcd(P, Q) = 1 occurs exactly for .P = ±1 and .Q = 1. . Remark 22 Alternatively, one could prove Corollary 39 by observing first that Q must be .±1. Indeed, if some prime p divides Q, then no U term is divisible by p. In particular, no .Un , .n > 0, is zero. Remark 23 Amusingly, one may obtain Lemma 17 with the laws of appearance and repetition and the Dirichlet theorem on primes in arithmetic progressions. Suppose U is degenerate and n is the least .t ≥ 1 such that .Ut = 0. Then for all primes .p Q, .ρ(p) | n. Since .Ud = 0 if .0 < d < n, all primes p, up to finitely many exceptions, must satisfy .ρ(p) = n. By the law of appearance, .n | p ± 1. Hence, all, but finitely many primes, lie in the two arithmetic progressions .±1 (mod n). Therefore, .ϕ(n) ≤ 2, and n must be 3, 4, or 6. By the same token, a degenerate sequence cannot have a square discriminant D for then all primes, but finitely many, would be .1 (mod n). This can be easily verified: Indeed, .P 2 = Q, 2Q, or 3Q with .P 2 − 4Q = A2 , respectively, forces 2 2 2 .−3P , .−P , and .−P /3 to be integral squares. However, invoking Dirichlet’s theorem here is like using an elephant to kill a mosquito.
2.12 Divisibility of Un and Vn by Powers of a Special Prime Let .{U, V } be a pair of Lucas sequences with parameters P and Q. For p a regular prime, we know the p-adic valuation of all U and V terms: If .p | Q, the p-adic valuation of all .Un and .Vn with .n ≥ 1 is zero by Lemma 2. If
46
2 Basic Theory of the Lucas Sequences
p 2Q, then Corollary 11 and Theorem 8 fully describe the p-adic valuation of all .Un , while Corollary 21 and Theorem 22 give the valuation of all .Vn . If .p = 2 and Q is odd, then Theorems 13 and 14 provide the 2-adic valuation of all .Un , and Theorem 24 informs us about the 2-adic valuation of all V terms. We summarize these various theorems that concern regular primes in two nearly identical propositions, as they differ only in their form. But one wording is sometimes more convenient than the other. .
Proposition 40 Suppose p is a regular prime. If .p | Q, then .νp (Un ) = 0 for all .n ≥ 1. If .p Q, then p admits a finite rank .ρ, where ⎧ ⎪ ⎨a divisor of p − (D | p), if p ≥ 3; .ρ is 2, if 2 | P and p = 2; ⎪ ⎩ 3, if P is odd and p = 2. Let .ν be the rank exponent of .p Q. If .p ≥ 3, or if .p = 2, but either P is even, or P is odd and .Q ≡ 1 (mod 4), then 0, if ρ n; .νp (Un ) = (2.59) ν + νp (n/ρ), if ρ | n. If P is odd and .Q ≡ −1 (mod 4), then ⎧ ⎪ ⎨0, .ν2 (Un ) = 1, ⎪ ⎩ ν2 (U6 ) + ν2 (m),
if 3 n; if n = 6m + 3; if n = 6m.
(2.60)
Proposition 41 Suppose p is a regular prime of rank .ρ. Then for .n ≥ 0, ν (Un ) > 0 if and only if ρ divides n,
. p
(2.61)
with the convention that .ρ = +∞, if .p | Q. Furthermore, if .p ≥ 3, or if .p = 2, and either P is even, or P is odd with .Q ≡ 1 (mod 4), then for all .n ≥ 1, ν (Uρn ) = ν + νp (n), if p Q,
. p
(2.62)
where .ν is the rank exponent of p. If P is odd and .Q ≡ −1 (mod 4), then 1, if 2 n; .ν2 (U3n ) = (2.63) ν2 (P 2 − 3Q) + ν2 (n), if 2 | n. Now we address the problem of determining the p-adic valuation of the terms of Lucas sequences when p is a special prime. Thus, we have .pa || P
2.12 Divisibility by Powers of a Special Prime
47
and .pb || Q, where a and b are positive integers. These results appear in the paper [2], but the proofs provided here are more concise. A lower bound for .νp (Un ) is given in the next theorem. It implies that .νp (Un ) tends to infinity as .n → ∞, a behavior that sets special primes apart from regular ones. Theorem 42 Suppose p is a special prime, i.e., p divides .gcd(P, Q). Then n .νp (Un ) ≥ , 2 for all .n ≥ 1. Proof We proceed by induction on n after noting that as .U1 = 1 and .U2 = P , we clearly have .νp (U1 ) = 0 ≥ 12 and .νp (U2 ) ≥ 1 = 22 . Suppose .n ≥ 3 and k .νp (Uk ) ≥ for .k = n − 2 and .n − 1. Then 2 ν (Un ) ≥ min{νp (P Un−1 ), νp (QUn−2 )}
. p
≥ 1 + min{νp (Un−1 ), νp (Un−2 )} n−2 n = 1+ . = 2 2
We will consider two cases: .b ≥ 2a and .2a > b. Case I. .b ≥ 2a. The p-adic valuation of .Un will be seen to contain two terms. One term, .(n − 1)a, gives a steady linear growth in terms of n; the other is the p-adic valuation of .Un , where .U is a Lucas sequence for which p is regular. Theorem 43 Suppose p is a special prime with .P = pa P , .Q = pb Q , .p P Q , and .b ≥ 2a. Then for all .n ≥ 1, (n − 1)a, if b > 2a; .νp (Un ) = (n − 1)a + νp (Un ) = (n − 1)a + νp (Un ), if b = 2a, where .U = U (P , pb−2a Q ). Proof By (2.30) and writing .b = 2a + c, .(c ≥ 0), we find that for all .n ≥ 1, n−k−1 .Un = Ψn (P, Q) = (−1)k P n−1−2k Qk k k≥0 n − k − 1 (n−1−2k)a 2ka n−1−2k c k = (−1)k p (P ) (p Q ) p k k≥0
= p(n−1)a Ψn (P , pc Q ) = p(n−1)a Un (P , pc Q ). By Lemma 2, no term of .U (P , pc Q ) is divisible by p if .c ≥ 1.
.
48
2 Basic Theory of the Lucas Sequences
Case II. .2a > b. We start with the p-adic valuation of odd-indexed terms .U2n+1 . Theorem 44 Suppose p is a special prime, .P = pa P , .Q = pb Q with .2a > b, and .p P Q . Then, for all odd .n ≥ 1, n .νp (Un ) = b = bm, if n = 2m + 1. 2 Proof Again, by (2.30), we have U2m+1 =
.
m
(−1)
k=0
k
2m − k P 2m−2k Qk . k
(2.64)
The p-adic valuation of .P 2m−2k Qk is .2ma − (2a − b)k, which reaches an absolute minimum when .k = m. As, for .k = m, the binomial coefficient 2m − k . =1 k is not divisible by p, the p-adic valuation of .Un is decided by the last term of the sum in (2.64). Hence, we obtain ν (Un ) = 2ma − (2a − b)m = bm.
. p
.
We now look at the valuation of .U2n when .2a > b. We begin with a lemma established with the method and notation of Theorem 43. Lemma 18 If .2a = b + c with .b ≥ 2 even and .c ≥ 0, then Un (P, Q) = p(n−1) 2 · Un (pc/2 P , Q ). b
.
Proof Note that P n−1−2k Qk = p(n−1−2k) 2 (pc/2 P )n−1−2k · pbk Qk . b
.
Therefore, by (2.31),
Un = Ψn (P, Q) = p(n−1)b/2 Un (pc/2 P , Q ).
.
.
Theorem 45 Suppose p is a special prime, .P = pa P , .Q = pb Q with .2a > b, and .p P Q . Then, for all .n ≥ 1, ν (U2n ) = bn + (a − b) + νp (n) + hn ,
. p
where
h = νp (P 2 − Q ) · [2 ≤ p ≤ 3] · [2a = b + 1] · [p | n].
. n
(2.65)
2.12 Divisibility by Powers of a Special Prime
49
Proof By (2.20), U2n = U2 (P, Q) · Un (V2 , Q2 ) = P · Un (V2 , Q2 ).
.
Set .a := νp (V2 ) = νp (P 2 − 2Q) and .b := νp (Q2 ) = 2b. We see that ⎧ ⎪ if p is odd; ⎨b, .a = b + 1, if p = 2 and 2a ≥ b + 2; ⎪ ⎩ b + 1 + ν2 (P 2 − Q ), if p = 2 and 2a = b + 1.
(2.66)
(2.67)
Define .c by .2a = b + c . Since .b = 2b is even, we apply Lemma 18 to 2 .U (V2 , Q ) to yield
Un (V2 , Q2 ) = p(n−1)b /2 Un (pc /2 V2 , Q2 ),
.
(2.68)
where .V2 = p−a V2 . Case 1. .p = 2. Note that, by (2.67), .c = 2(1 + ν · [2a = b + 1]) with 2 .ν = ν2 (P − Q ). Since .c > 0, 2 is a regular prime of rank 2 and rank exponent .c /2 in .U (pc /2 V2 , Q2 ). Thus, combining (2.66) and (2.68) with (2.59), we obtain
ν (U2n ) = ν2 (P ) + ν2 (p(n−1)b /2 ) + ν2 Un (pc /2 V2 , Q2 ) = a + (n − 1)b + (c /2 − 1) + ν2 (n) · [2 | n] = bn + (a − b) + ν · [2a = b + 1] + ν2 (n) · [2 | n].
. 2
That is, ν (U2n ) = bn + (a − b) + ν2 (n) + ν · [2a = b + 1] · [2 | n],
. 2
which corresponds to (2.65). Case 2. .p ≥ 3. We see that .a = b /2 = b so that .c = 0. Hence, by (2.68), 2 −b .νp Un (V2 , Q ) = (n − 1)b + νp Un (p V2 , Q2 ) and, by (2.59), we get 2 .νp Un (V2 , Q ) = (n − 1)b + (ν − 1) + νp (n) · [ρ | n],
(2.69)
−b 2 where .ρ is the rank and .ν the rank exponent of p in .U (p V2 , Q ). By (2.66), 2 .νp (U2n ) = a + νp Un (V2 , Q ) , and we conclude that .νp (U2n ) = bn + (a − b) + νp (n) + (ν − 1) · [ρ | n]. (2.70)
To determine the values of .ρ and .ν, we compute the discriminant .D associated with .U (p−b V2 , Q2 ). Thus,
50
2 Basic Theory of the Lucas Sequences
D = p−2b (P 2 − 2Q)2 − 4Q2 = p−2b (P 4 − 4P 2 Q).
.
As .νp (P 4 ) = 4a > 2a + b = νp (4P 2 Q), we see that ν (D ) = −2b + (2a + b) = 2a − b > 0.
. p
Therefore, .ρ(p) = p. Furthermore, if .p ≥ 5 or if .p = 3 and .2a ≥ b + 2, then .ν = 1 by Theorem 12. In those cases, we see that (2.70) yields what the theorem claims. It remains to prove that if .p = 3 and .2a = b + 1, then 2 .ν = 1 + ν3 (P − Q ). On the one hand, by (2.69), .ν3 U3 (V2 , Q2 ) = 2b + ν. 6 (P,Q) 2 2 On the other hand, .U3 (V2 , Q2 ) = U U2 (P,Q) = (P − Q)(P − 3Q). Thus, ν U3 (V2 , Q2 ) = b + (b + 1) + ν3 (P 2 − Q ) = 2b + 1 + ν3 (P 2 − Q ).
. 3
This yields the value of .ν.
.
We summarize the last three theorems integrating the cases when .b = 0 into our statement and avoiding the use of Iverson symbols. Theorem 46 Suppose .U = U (P, Q), .U = U (P , Q ), where .P = pa P , .a > 0, .Q = pb Q , .b ≥ 0, and .p P Q . If .b ≥ 2a, then, for all .n ≥ 1, ν (Un ) = (n − 1)a + νp (Un ).
. p
If .2a > b, then for all .n ≥ 1, ν (U2n+1 ) = bn, νp (U2n ) = bn + (a − b) + νp (n) + h,
. p
where
νp (P 2 − Q ), .h = 0,
if 2 ≤ p ≤ 3, 2a = b + 1 and p | n; otherwise.
Now we express the p-adic valuation of .Vn . By the identity .U2n = Un Vn , we have .νp (Vn ) = νp (U2n ) − νp (Un ). Thus, using Theorem 46, we readily obtain the following: Theorem 47 Suppose .V = V (P, Q), .V = V (P , Q ), where .P = pa P , .a > 0, .Q = pb Q , .b ≥ 0, and .p P Q . If .b ≥ 2a, then, for all .n ≥ 1, ν (Vn ) = na + νp (Vn ).
. p
If .2a > b, then, for all positive V indices, ν (V2n+1 ) = bn + a + νp (2n + 1) + k,
. p
νp (V2n ) = bn + ,
References
where
51
k=
.
ν3 (P 2 − Q ), 0,
if p = 3, 2a = b + 1 and n ≡ 1 (mod 3); otherwise,
and ⎧ 2 ⎪ ⎨1 + ν2 (P − Q ), . = 1, ⎪ ⎩ 0,
if p = 2, 2a = b + 1 and n ≡ 1 (mod 2); if p = 2 and 2 | n or 2a > b + 1; otherwise.
References 1. C. Ballot, Lucas sequences with cyclotomic root field, Dissertationes Math. 490 (2013), 92 pp. 2. C. Ballot, The p-adic valuation of Lucas sequences when p is a special prime, Fibonacci Quart. 57 (2019), 265–275. 3. R. D. Carmichael, On the numerical factors of the arithmetic forms αn ± β n , Ann. of Math. (2) 15 (1913–14), no. 1-4, 30–48, 49–70. 4. F. G. Dorais and D. W. Klyve, A Wieferich prime search up to 6.7× 1015 , J. Integer Seq. 14 (2011), Art. 11.9.2, 14pp. 5. A. Granville and M. Monagan, The first case of Fermat’s last theorem is true for all prime exponents up to 714,591,416,091,389, Trans. Amer. Math. Soc. 306 (1988), no. 1, 329–359. 6. H. W. Gould, The Girard-Waring power sum formulas for symmetric functions and Fibonacci sequences, Fibonacci Quart. 37 (1999), 135–140. 7. G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, Oxford at the Clarendon Press, London, 4th edition, 1960. 8. J. Klaˇska, Donald Dines Wall’s conjecture, Fibonacci Quart. 56 (2018), 43–51. 9. J. Lagarias, The set of primes dividing the Lucas numbers has density 2/3, Pacific J. Math. 118, 2 (1985), 449–461; Errata: Pacific J. Math. 162, 2 (1994), 393–397. 10. D. H. Lehmer, An extended theory of Lucas’ functions, Annals of Math. 31 (1930), 419–448. 11. T. Lengyel, The order of the Fibonacci and Lucas numbers, Fibonacci Quart. 33 (1995), 234–239. ´ Lucas, Th´eorie des fonctions simplement p´eriodiques, Amer. J. Math. 12. E. 1 (1878), 184–240, 289–321. ´ Lucas, Th´eorie des Nombres, Editions ´ Jacques Gabay, 1991. (Autho13. E. rized re-edition of the original 1891 Gauthier-Villars edition.) 14. P. Moree, On the divisors of ak + bk , Acta Arith. 80 (1997), no. 3, 197– 212.
52
2 Basic Theory of the Lucas Sequences
15. P. Ribenboim, The Fibonacci numbers and the Arctic Ocean, Proceedings of the 2nd Gauss Symposium. Conference A: Mathematics and Theoretical Physics, (Munich, 1993), 41–83, Sympos. Gaussiana, de Gruyter, Berlin, 1995. 16. C. Sanna, The p-adic valuation of Lucas sequences, Fibonacci Quart. 54 (2016), 118–124. ´ 17. H. C. Williams, Edouard Lucas and Primality Testing, Canadian Math. Soc. Series of Monographs and Advanced Texts, John Wiley and Sons, NY, 1998.
Chapter 3
Applications
I suspect at its best your education’s main motive is to fuel your curiosity and teach you how to find things for yourself . . . The educationists seem to think in terms of methodical steps but a teacher brimming with passion for the subject is what actually works. (Jim Harrison in “Off to the Side”)
Abstract The purpose of this chapter is to review several diverse applications of the Lucas functions, particularly in the area of computational number theory. We will begin with a largely historical description of the Mersenne primes and then examine how the Lucas functions have been applied to the problem of primality testing. As this requires that we be able to compute .Un and/or .Vn for large values of n, we provide in Sect. 3.3 some algorithms by which this can be done. We next describe several subjects, such as solving congruences, integer factorization, Diophantine equations, and cryptography in which the Lucas functions have been applied.
3.1 Mersenne Primes We have already mentioned that a very early application of the Lucas sequences was to the problem of proving that .2127 − 1 is a prime. For reasons that we will discuss later in this section, it is now customary to call prime numbers of the form .2n − 1 Mersenne primes. In this section, we provide a brief discussion of the history and the primality of such numbers; more detail and references for this material can be found, for example, in Sects. 1.4 and 2.1 and Chap. 3 of [77]. We say that an integer d is an aliquot or proper divisor of a positive integer n if .0 < d < n and d divides n. For example, 3 is an aliquot divisor of 6, but neither 5 nor 6 is. We define the function .s(n) of a positive integer n to be the sum of all the aliquot divisors of n. Some examples are © Springer Nature Switzerland AG 2023
C. J.-C. Ballot, H. C. Williams, The Lucas Sequences, CMS/CAIMS Books in Mathematics 8, https://doi.org/10.1007/978-3-031-37238-4 3
53
54
3 Applications
s(6) = 1 + 2 + 3 = 6, s(28) = 1 + 2 + 4 + 7 + 14 = 28, .
s(60) = 1 + 2 + 3 + 4 + 5 + 6 + 10 + 12 + 15 + 20 + 30 = 108. Euclid defined a positive integer n to be perfect if .s(n) = n. We see from the above that both 6 and 28 are perfect. It is not clear what the origin of this concept is, but it is telling that if we have .s(n) = n, then the sum of the reciprocals of all the divisors of n is 1. As much of Greek mathematics at the time of Euclid and earlier was being developed in the Egyptian city of Alexandria, it is possible that the idea of numerical perfection arose from the ancient Egyptian technique of performing arithmetic using only unit fractions (reciprocals of positive integers). Euclid proved that if n−1 n .m = 2 (2 − 1), where .2n − 1 is a prime, then m is perfect. Much later, Euler, in a paper published posthumously in 1849, showed that if m is an even perfect number, then it must be of Euclid’s form. Although there has been much activity in searching, no odd perfect number is currently known; if one does exist, it must exceed .101500 (Ochem and Rao [56]). Thus, to find the even perfect numbers, it is necessary to find the values of n such that .2n − 1 is prime. As we mentioned earlier, such numbers are today called Mersenne primes after the French Minim friar Marin Mersenne (1588– 1648). Mersenne was very much involved in the organization of European culture during his time; he entertained several important scientific visitors at his cell and maintained a voluminous correspondence with many of the leading savants of the seventeenth century. For much more information on these activities, especially as they affected mathematics, the reader is referred to the paper of Grosslight [28]. In 1644, Marin Mersenne stated that all the values of .n ≤ 257 for which 2n − 1 is prime are given in the following list:
.
n = 2, 3, 5, 7, 13, 17, 19, 31, 67, 127, 257.
.
(The correct list is .n = 2, 3, 5, 7, 13, 17, 19, 31, 61, 89, 107, 127, but this was not proved until more than two centuries later.) It is because of Mersenne’s early interest in numbers of the form .Mn = 2n − 1 that they are today called Mersenne numbers. We remark here that .(Mn ) (.= (Un (3, 2))) is a divisibility sequence. It follows that if .Mn is a prime, then so must n be a prime. The early Greeks knew of the first four numbers in Mersenne’s list and possibly more. At the time of this writing, 51 Mersenne primes have been identified. All of these can be found at the GIMPS [26] (Great Internet Mersenne Prime Search) website. The 51st of these is .M82589933 , a number of over 24 million decimal digits and the largest prime currently known.
3.1 Mersenne Primes
55
When Lucas published [41], he was unaware of Mersenne’s list; he learned of it a few months later from Genocchi [36] and was more impressed by it than he should have been. This was because Mersenne was a correspondent of Pierre de Fermat, one of Lucas’ mathematical heroes, and this to Lucas meant that Mersenne was likely in possession of unpublished and important mathematical information that had been lost. We have already stated that Lucas made use of the properties of the Fibonacci and Lucas numbers to prove that .M127 is a prime. The two theorems that he relied on in [41] were not proved there or correctly in any of his subsequent papers. It was Carmichael [19] in 1913 who provided correct proofs of these results. Nevertheless, it seems that Lucas had the right idea, and in a paper (Lucas [42]) that he published in April 1877, but had largely completed as early as August of 1876, he gave a reasonably complete (for Lucas) and mostly correct account of his ideas for proving .M127 a prime. He knew that 2 n .(Fn ) is a divisibility sequence and that .F2n = Fn Ln , .L2n = Ln − 2(−1) , and 2 2 n .Ln − 5Fn = 4(−1) . From the last of these, he knew that .gcd(Fn , Ln ) | 2. Furthermore, he was aware that for any positive m, there exists the rank of appearance .ρ(m) of m in .(Fn ) and that if .m | Fk , then .ρ(m) | k. He proved that if p (.= 5) is a prime and we define .p = 1 when .p ≡ ±1 (mod 5) and .p = −1, otherwise, then .ρ(p) | p − p . Now put .ri = L2i and .si = F2i . We have .r1 = L2 = 3, .ri+1 = ri2 − 2, and .ri is odd for .i ≥ 1. Also, .si+1 = si ri and .gcd(si , ri ) = 1. At this point, Lucas once again appeals to a result for which he did not have a correct proof, but he was likely aware that this rather general result was not needed for his immediate purposes. Let p be any odd prime such that .p | ri (note that .p = 5 because 2 is a quadratic nonresidue of 5). We see that .p | si+1 and because .gcd(si , ri ) = 1, we have .p si . It follows that .ρ(p) | 2i+1 , .ρ(p) 2i , and therefore .ρ(p) = 2i+1 . Since .ρ(p) | p ± 1, we have .2i+1 | p ± 1, which means that .p = 2i+1 k ± 1. Thus, Lucas could show that if .N = Mn = 2n − 1 and .N | ri , then any prime divisor p of N must be of the form .2i+1 k ± 1 (.≥ 2i+1 − 1). If .n ≡ 3 (mod 4), then .Mn = 24t+3 − 1 ≡ 8 − 1 ≡ 2 (mod 5). Thus, if .N = Mn is a prime, then .N = −1, and we have .N | FN +1 . Since FN +1 = sn = sn−1 rn−1 = sn−2 rn−2 rn−1 = sn−3 rn−3 rn−2 rn−1 = r1 r2 r3 · · · rn−1 ,
.
Lucas was aware that the values of the .ri here must be prime to one another. Thus, we can test N for primality simply by finding some i (.1 ≤ i ≤ n − 1) such that .N | ri ; such a value of i must exist if N is a prime. A somewhat abridged (and corrected) version of Lucas’s test (Lucas [41]) is the following: Theorem 48 Let .N = Mn = 2n − 1 with .n ≡ 3 (mod 4). If none of the .ri for .i = 1, 2, 3, . . . , n − 1 is divisible by N , then N is composite. If i is the least value of j .(1 ≤ j ≤ n − 1) such that .N | rj , then any prime divisor p of N must be of the form .2i+1 k ± 1.
56
3 Applications
Notice √ that if .2i ≥ n, then the least prime which can divide N must exceed . N , which means that N must be a prime; thus, if .Mn divides .rn−1 , then .Mn is a prime. At this point (1876), Lucas was unaware that testing the divisibility of .rn−1 by .Mn is not only sufficient to prove the primality of .Mn = 2n − 1 with .n ≡ 3 (mod 4), but it is also necessary. Two years later, he showed (Lucas [45]) that if p is any prime such that .(5 | p) = −1 and .p ≡ −1 (mod 4), then .Lp+1 ≡ −2 (mod p). Hence, if .N = Mn is a prime, then since .Mn ≡ −1 (mod 4), we have .−2 ≡ LN +1 = L2(N +1)/2 − 2, and we get .N | L(N +1)/2 or .N | rn−1 . Thus, Lucas discovered: Theorem 49 If .Mn = 2n − 1 with .n ≡ 3 (mod 4), then .Mn is a prime if and only if .Mn divides .rn−1 , where .r1 = 3 and .ri+1 ≡ ri2 − 2 (mod Mn ). This, of course, is a test for the primality of .Mn = 2n − 1 with .n ≡ 3 (mod 4), but why did he choose to test .M127 ? Had he known of Mersenne’s list, this would be easier to answer, but all he knew was that .127 ≡ 3 (mod 4) and 127 is a prime. There are several other candidates that he might have tried, and it remains a mystery as to why he selected .M127 . Possibly, he was impressed by the following: 3 = 22 − 1 = M2 , 7 = 23 − 1 = M3 , 127 = 27 − 1 = M7 ,
.
and thought it was natural to try .M127 as it is the next number in the progression.† In any event, he put .r1 = 3 and computed .r126 (mod M127 ) recursively by using .ri+1 ≡ ri2 − 2 (mod M127 ). This requires 125 modular squaring operations, most of which involve numbers of 39 digits, at the time an enormous undertaking. However, by observing the simple congruence 2m+n ≡ 2m
.
(mod Mn ),
he was able to develop an ingenious technique, involving the simple movement of pawns on a .127 × 127 chessboard, to compute the value of .ri+1 ≡ ri2 − 2 (mod M127 ) from the value of .ri (mod M127 ). As his overall procedure was a somewhat exacting and time-consuming process, he only performed it once and at the end discovered that .r126 ≡ 0 (mod M127 ). Lucas realized that he could not use the Fibonacci and Lucas numbers to establish the primality of .Mn = 2n − 1 with .n ≡ 1 (mod 4) because in this case, .Mn ≡ 1 (mod 5) and therefore .Mn = 1 whenever .Mn is a prime. Perhaps this is what motivated him to investigate the features of the Lucas sequences. He quickly discovered that the properties of the Fibonacci and Lucas numbers could be extended to .(Un ) and .(Vn ), but it took him several months to produce a prime test for such .Mn . In Lucas [43], he suggests using
†
Thus, .M127 is a Mersenne prime, but .MM127 which has more than .1037 digits is currently out of reach.
3.1 Mersenne Primes
57
P = 4 and .Q = 1. In this case, .D = 12 and .(D | Mn ) = (3 | Mn ). Since M2k+1 = 22k+1 − 1 ≡ 1 (mod 3) and also .M2k+1 ≡ −1 (mod 4), we get .(3 | Mn ) = −(Mn | 3) = −1. If we put .ri = V2i , then .r0 = V1 = 4 and 2 .ri+1 = ri − 2 for .i ≥ 0. Thus, we have .rn−1 = V(N +1)/2 when .N = Mn . Proceeding in an analogous fashion to the case of .n ≡ 3 (mod 4), we see that if .N | rn−1 , then N must be a prime. Notice that because we only assumed here that n is odd, this test will also work in the case that .n ≡ 3 (mod 4). This, of course, is half of the celebrated Lucas-Lehmer test for the primality of Mersenne numbers. Lucas, however, paid little attention to it, mentioning it as little more than an afterthought at the end of his paper, but he did cite it in Lucas [46], as this was the test used by Hudelot to ascertain the primality of .M61 . In [45], he unwittingly proved that this test was both necessary and sufficient for any .Mn to be prime for any odd n (.= 2m + 1).≥ 3. In the last result of this paper, he puts .P = 2m+1 and 2m+2 .Q = −1; then .D = 2 + 4 = 4(22m + 1). If .N = Mn , then the Jacobi symbol . .
. N
= (D | N ) = (22m + 1 | 22m+1 − 1) = (22m+1 − 1 | 22m + 1) = (−3 | 22m + 1) = (22m + 1 | 3) = (2 | 3) = −1.
Thus, by the same reasoning as used above, we see that if .N | V(N +1)/2 , then N must be a prime. Earlier in the paper, Lucas had established that if p is an odd prime, then for any P and Q, we have 2Vp+1 ≡ P p+1 + D(p+1)/2 ≡ P 2 + p D
.
(mod p).
2 Thus, if .p = −1 = Q, we get .Vp+1 ≡ −2 (mod p). Since .Vp+1 = V(p+1)/2 − 2Q(p+1)/2 , it follows that .V(p+1)/2 ≡ 0 (mod p) whenever .p ≡ 3 (mod 4). As a consequence of the above, we see that if .N = Mn is a prime, then m+1 .N | V(N +1)/2 when .P = 2 and .Q = −1. If, as earlier, we define .ri = V2i , 2 then .r1 = V2 = P − 2Q = 22m+2 + 2 ≡ 4 (mod N ), .rn−1 = V(N +1)/2 , and .ri+1 = ri2 − 2 for .i ≥ 1. Lucas had, without realizing it, proved the Lucas-Lehmer test for the primality of .Mn for any odd n:
Theorem 50 Let .N = Mn for any odd .n ≥ 3, and put .r1 = 4. If we define r ≡ ri2 − 2 (mod N ) for .i ≥ 1, then N is a prime if and only if .rn−1 ≡ 0 (mod N ).
. i+1
This is the test that has been used to find all the known Mersenne primes Mn for .n > 127. Indeed, it is remarkable that tests similar to this exist for more exotic forms of N . See, for instance, Roettger and Williams [61] for examples and further references.
.
58
3 Applications
3.2 Primality Testing Suppose N is an odd positive integer and we wish to know whether or not N is a prime. By Fermat’s little theorem, we know that if N is a prime, then for all integers a, we must have aN ≡ a
.
(mod N ).
(3.1)
Thus, if this Fermat congruence does not hold for any value of a, then N cannot be a prime. Unfortunately, for primality proving, it is possible for composite integers N to satisfy this congruence for some value of a. For example, consider .a = 2 and .N = 2701 = 37 · 73, an example known to Lucas. Hence, the direct converse of Fermat’s theorem does not hold. Indeed, there exists an infinitude of composite numbers, called Carmichael numbers, for which the Fermat congruence holds for all values of a. See, for example, Sect. 3.3 of Crandall and Pomerance [21] or Sect. 15.1 of [77]. If we want to use the Fermat congruence as a prime test, we need only concern ourselves with those values of a such that .gcd(a, N ) = 1. In this case, the Fermat congruence becomes N −1 .a ≡ 1 (mod N ). (3.2) Thus, if (3.2) does not hold for any value of a such that .gcd(a, N ) = 1 and 1 < a < N , then N cannot be a prime. Of course, if .gcd(a, N ) = 1 and .1 < a < N , then it is not necessary to verify (3.2) because N is clearly composite. It can also be shown that if N satisfies (3.2) for all a such that .gcd(a, N ) = 1, then N is a Carmichael number. .
Now observe that a Mersenne number is a special case of a number N for which we know all of the divisors of .N + 1. In order to prove such values of N to be prime, Lucas [44, Sect. 27] advocated the use of what he called his fundamental theorem. This holds for all regular U sequences. Theorem. If N is odd and .N | UN −γ , where .|γ| = 1, but .N Ud for all aliquot divisors d of .N − γ, then N is a prime. Notice that, if for some integer a, we put .P = a + 1 and .Q = a, the above result can be used to prove the following corollary: Corollary. If N is odd and .N | aN −1 − 1 and .N ad − 1 for all aliquot divisors d of .N − 1, then N is a prime. This result was what Lucas [47, p. 441] considered to be the converse of Fermat’s theorem. Later, Lehmer [34] pointed out that this result could be made more efficient by replacing the values of d above by .(N − 1)/p for each distinct prime divisor p of .N − 1. A similar observation can also be applied to Lucas’ fundamental theorem.
3.2 Primality Testing
59
Although he made several attempts, Lucas was never able to provide a correct proof of his fundamental theorem; the ingredients for providing a correct proof were finally given by Carmichael [19]. A somewhat more accessible proof can be found in Sect. 4.3. The difficulty in using Lucas’ fundamental theorem in primality proving is that in almost all cases, the complete factorization of .N − γ is not available. In [44] and in some earlier papers, Lucas used his functions to test numbers other than the Mersenne numbers for primality. For example, although he did not state this result explicitly, Lucas seemed to be aware of the following theorem. Theorem 51 Let .N = A2n − 1, .n ≥ 1, where A is odd and .A < 2n . If .gcd(N, Q) = 1 and .N | V(N +1)/2 , then N is a prime. Proof Suppose p is any prime divisor of N . Then .p | V(N +1)/2 , and it follows that .p | UN +1 . Thus, .ρ(p) | A2n . Since p does not divide Q, we see, by (2.8), that p cannot divide .U(N +1)/2 and therefore .ρ(p) A2n−1 . We must have n .2 | ρ(p), which means, by the reasoning used in the proof of Theorem 48 or by appealing directly to Theorem 9, that .p = k2n ± 1. If .p = 2n − 1, then n n .2 ≡ 1 (mod p) and thus .N ≡ A − 1 (mod p). Since .A − 1 < 2 − 1, we find √ n that .A = 1, which means that .N = p. Otherwise, .p ≥ 2 + 1 > N , which . also implies the primality of N . He also discussed the primality of numbers of the form Apn + γ,
.
(3.3)
where .γ = ±1, p is a prime, and .p A (in Lucas’ tests, .p = 2, 3, 5, and .γ is restricted to be 1 when .p = 5). Unfortunately, his tests were given without proof and need some corrections and modifications, which were provided recently by Roettger et al. [60]. Furthermore, these tests are sufficiency tests only. A version of the test of Theorem 51 which is both necessary and sufficient was given by Lehmer [36]. Theorem 52 Let .N = A2n − 1, where .n ≥ 1, A is odd, and .A < 2n . If .(D | N ) = (Q | N ) = −1, then N is a prime if and only if .N | V(N +1)/2 . Proof This result follows from the law of appearance (Theorem 9), Theo. rem 36, and Theorem 51. This result, however, is not effective in that it does not provide an explicit recipe for finding the values of P and Q which can be used. However, in the case where .3 AN , it is a simple matter to see that when .n ≥ 3, we can always use .P = 2 and .Q = −2, but when .3 | A, the problem of finding suitable values for P and Q becomes more difficult; however, in [12], Bosma showed how to 4m − 1. These results were improved produce such P and Q as long as .A = by Berrizbeitia and Berry [7] to the case of .5 A. More recently, Deng and Huang [22] revisited this problem and dealt with the case of .17 A. We can also approach this problem by using the lemma below.
60
3 Applications
Lemma 19 Let p be a prime such that .p ≡ −1 (mod 4). There exist P and Q such that .(D | p) = (Q | p) = −1 if and only if .Q ≡ a2 + b2 and .P ≡ 2a (mod p), where a and b are integers such that .(a2 + b2 | p) = −1. Proof Suppose .Q ≡ a2 +b2 , .P ≡ 2a (mod p), and .(a2 +b2 | p) = −1. We have 2 .(Q | p) = −1 and .p b. Since .D ≡ −4b (mod p) , we have .(D | p) = −1. Next, suppose that .(D | p) = (Q | p) = −1. We have .(4Q − P 2 | p) = 1; hence, there must exist some c such that .c2 ≡ 4Q − P 2 (mod p), and as a consequence, we have .Q ≡ (2−1 P )2 +(2−1 c)2 (mod p); the result follows on putting .a ≡ 2−1 P and .b ≡ 2−1 c (mod p). . We can combine Theorem 52 and Lemma 19 to produce the following test: Theorem 53 Let .N = A2n − 1, where .n > 1, A is odd, and .A < 2n . Let q be a prime such that .q ≡ 1 (mod 4) and .(N | q) = −1. If a and b are integers such that .q = a2 + b2 and we put .P = 2a and .Q = q, then N is a prime if and only if .N | V(N +1)/2 . If the q in this theorem is small, we can find a and b by trial, but if it is large, Brillhart’s [13] modification of Hermite’s algorithm can be used to find them very effectively. The main ingredient in proving the above tests is the prior determination of the forms of possible prime factors of N . Most of these results make use of techniques which show that all prime divisors of N must have a certain form, but it is sometimes possible to proceed when we know that N has at least one prime divisor of a certain form. Lemma 20 Suppose that N is given by (3.3), where .n ≥ 1 and .A < pn . If N has at least one prime divisor r of the form .kpn + , where . ∈ {1, −1}, then N is a prime. Proof If N is composite, then .N = rT , where .r = kpn + , .k ≥ 1, and n n .T > 1. Since .rT ≡ γ (mod p ), we must have .T = hp + γ and .h ≥ 1. n n n Hence, .(kp + )(hp + γ) = Ap + γ; it follows that A = hkpn + (γk + h) = hk(pn − 1) + (k + )(h + γ) − γ.
.
Suppose p is odd. In this case, since r and T must be odd, we see that both h and k are even. Hence, A ≥ 4(pn − 1) − 1 > pn ,
.
which is impossible by selection of A. Next, suppose .p = 2. In this case, since A must be odd, we see that h and k are of different parity, and therefore .hk ≥ 2. Thus, A ≥ 2(2n − 1) − 1 = 2n+1 − 3 > 2n ,
.
another impossibility. Hence, N must be a prime.
.
3.2 Primality Testing
61
Note that if use is made of the reasoning of Robinson in Theorem 10 of [59], it is often possible to refine the above argument to increase the upper bound on A. We can now use the Lucas sequences to establish that a number N has a prime divisor of the form .kpn + , where . ∈ {1, −1}. Lemma 21 Let p be a prime and N be a positive integer such that .gcd(N, 2pQ) = 1. If for some positive integer m we have .N | Ump and .N Um , there must exist a prime divisor of N of the form .kpn +, where . ∈ {1, −1} and .pn || mp. Proof Since .N | Ump and .N Um , there must exist a prime divisor r of N such that .ra || N (.a ≥ 1) and .ra Um . It follows that .ρ(ra ) | mp and a n a a k .ρ(r ) m; hence, .p | ρ(r ). Since, by Corollary 11, we have .ρ(r ) = r ρ(r) n for some .k ≥ 0 and .p = r, we must have .p | ρ(r). By Theorem 9, we have n .ρ(r) | r − r , where .r = 0, 1, or .−1, so we see that .r ≡ ±1 (mod p ). . By combining the results of Lemmas 20 and 21, we get the following: Theorem 54 Let N be of the form (3.3), where .n ≥ 1 and .A < pn . If .gcd(N, 2Q) = 1, .N | UN −γ , and .N U(N −γ)/p , then N is a prime. Proof Put .m = (N − γ)/p. We have .pn || mp, and by Lemma 21, there must exist a prime divisor of N of the form .kpn + , where . ∈ {1, −1}. Thus, N . is a prime by Lemma 20. Theorem 51 can be generalized to deal with numbers given by (3.3). Theorem 55 Let N be of the form (3.3), where .n ≥ 1 and .A < pn . If .gcd(N, 2Q) = 1 and .N | UN −γ /U(N −γ)/p , then N is a prime. Proof In the case that .p = 2, the proof is similar to that of Theorem 51. Suppose p is odd and .s = (p − 1)/2; by (2.38), we have Upr /Ur ≡ pQrs
.
(mod Ur ),
where .r = (N − γ)/p. Thus, by the conditions of the theorem, .N U(N −γ)/p and .N | UN −γ . The result now follows from Theorem 54. . Unfortunately, it is rather difficult to convert Theorems 54 or 55 into necessary and sufficient tests for the primality of N . However, results in Williams [74] can be used to prove the following .p = 3 analogue of Theorem 53. Theorem 56 Let N be of the form (3.3), where .p = 3, .n ≥ 1, and .A < 3n . Suppose q is a prime congruent to 1 modulo 3 such that .N (q−1)/3 ≡ 1 (mod q) and .4q = t2 + 27u2 , where .t ≡ 1 (mod 3). If .gcd(N, qu) = 1, then N is a prime if and only if .V2m (t, q) ≡ −q m (mod N ), where .m = (N − γ)/3.
62
3 Applications
A somewhat more general version of this result, proved by a different technique, was given later by Berrizbeitia and Berry [5]. A proof that for any given prime .q ≡ 1 (mod 3), values of t and u must always exist can be found in Sect. 6 of Chap. 9 of Ireland and Rosen [31] and in Chap. 4 of Cox [20]. Also, the value of D here is .−27u2 and .N = (D | N ) = (−3 | N ) = (N | 3) = γ. Further results for a general odd p are presented at some length in Sects. 11.3 and 16.4 of [77], and this matter is examined further in Sect. 7.4. In particular, we have a generalization of Theorem 56 in Theorem 11.3.6 of [77]. This can be converted into a necessary and sufficient test (Algorithm 11.3.7 of [77]) for the primality of N in (3.4) as long as some P and Q are given such that .(D | N ) = γ, .N UA (P, Q), and a prime q (.≡ 1 (mod p)) can be found such that .N (q−1)/p ≡ 1 (mod q). We should point out here that Berrizbeitia et al. [6] have given a very general necessary and sufficient algorithm, not requiring Lucas functions, for proving primality of a wider class of numbers than those in (3.3), but these tests are not in general effective. However, as we have pointed out earlier, in certain cases, such as the Mersenne numbers, it is possible to use the Lucas functions to produce an effective, necessary, and sufficient test for the primality of N . For example, this is always possible for a generalization of 3 (see the Mersenne numbers: .N = (p − 1)pn − 1, when .2 ≤ p < 107 , but .p = Stein and Williams [68]). The generalization .N = 2pn − 1 has been discussed by Roettger and Williams [62]. We have seen that the Lucas functions can be used to produce a test for the primality of N when either .N + 1 or .N − 1 has a large prime power factor. These are examples of primality proving when a partial factorization of .N ± 1 is available. In 1975, Brillhart, Lehmer, and Selfridge [14] showed how to make use of the Lucas functions and partial factorizations of both .N + 1 and .N − 1 in order to establish the primality of N . These techniques are also explained in Sects. 4.1 and 4.2 of [21] and in Sects. 12.2 and 12.3 of [77] and remain to this day the best methods for primality proving as long as enough factors of .N ±1 are known. Of course, this is usually not the case, and many other techniques for primality proving have been advocated since 1975; these are very ably described in [21] and from a historical perspective in [77]. Since the publication of these books, there have been several further advances. In 2002, Agrawal, Kayal, and Saxena announced a deterministic polynomial time algorithm for primality proving. Their technique, which does not involve Lucas functions, is described in [2] and in the book of Dietzfelbinger [24]. See also the insightful paper of Granville [27]. The elliptic curve primality proving (ECPP) technique of Atkin and Morain (see Chap. 7 of [21]) has been considerably refined by Morain [51], resulting in what is called fastECPP. This method has been used by Franke et al. [25] to establish the primality of numbers of up to 10 000 decimal digits. We noted at the beginning of this section that it is possible for a composite N to satisfy (3.2) for some .a > 1 such that .gcd(a, N ) = 1. We call such a
3.3 Fast Computation of Un and Vn (mod m)
63
value of N a base a pseudoprime or a-psp. By defining .N to be the value of the Jacobi symbol .(D | N ), we can extend this idea to the Lucas function .Un . For a given pair of coprime integers P , Q, we say that N is a Lucas pseudoprime if N is composite, .gcd(N, QD) = 1, and UN −N (P, Q) ≡ 0 (mod N ).
.
Certainly, by the law of appearance, this congruence must hold when N is a prime. Suppose, for a given odd N , we define D to be the first element in the sequence .{5, −7, 9, −11, 13, . . .} such that .(D | N ) = −1. In spite of the offer of a cash reward, since 1980, no composite N has ever been found for which N is both a 2-psp and a Lucas pseudoprime with .P = 1 and .Q = (1 − D)/4. Undoubtedly, such N exist, but they seem to be very rare. This observation has led to the inclusion of this Lucas pseudoprime test in NIST’s Federal Information Processing Standards Publication 186-4 (Appendix C.3.3) tests for the probable primality of integers employed in digital authentication algorithms. For more information concerning this topic, see Pomerance et al. [57], Sect. 3.5 of [21], and Chap. 15 of [77].
3.3 Fast Computation of Un and Vn (mod m) Let N denote any positive integer. For any integer .κ, it is well known (see, e.g., Algorithm 1.2.2 of [77]) that .κm (mod N ) can be computed in .O(log m) modthis problem with ular multiplication√operations . (mod N ). Now consider √ Q( d ), where d is an integer and . d is irrational. We note respect to .κ ∈ √ that .κ = (a + b d)/c, where .a, b, c are in .Z, and that c m κm =
.
√ Vm (P, Q) + b d Um (P, Q), 2
where, in this case, .P = 2a and .Q = a2 − db2 . If .gcd(c, N ) = 1, then √ m .κ ≡ Vm (P, Q)/2 + b d Um (P, Q) (mod N ), where .P ≡ 2ac−1 , .Q ≡ (a2 − db2 )c−2 (mod N ), and .cc−1 ≡ 1 (mod N ). Thus, the Lucas functions can play a role in determining .κm (mod N ). In many applications of the Lucas functions, such as primality testing, it is often necessary to compute rapidly some remote values of .Vm and/or .Um (mod N ). As pointed out in Sect. 4.3 of [77], this can be done by first observing the simple identities:
64
3 Applications
U2n = 2Un+1 Un − P Un2 , 2 − QUn2 , U2n+1 = Un+1
.
U2n+2 =
2 P Un+1
(3.4)
− 2QUn Un+1 .
We next define .{A, B} ≡ {E, F } (mod N ) to mean that .A ≡ E and .B ≡ F (mod N ). Let .(b0 , b1 , b2 , . . . , bk )2 be the binary representation of m. Suppose 2 2 2 .Pi = {A, B}; when .bi+1 = 0, put .Pi+1 ≡ {2AB − P A , B − QA } (mod N ); 2 2 2 when .bi+1 = 1, put .Pi+1 ≡ {B − QA , P B − 2QAB} (mod N ). If we put .P0 ≡ {1, P }, we see by the identities (3.4) that .Pk ≡ {Um , Um+1 }. We can find .Vm (mod N ) by using the identity .Vm = 2Um+1 − P Um . The above technique can be somewhat less efficient than the following method, which can be used when .gcd(P QD, N ) = 1, a case that occurs frequently. We define Wn ≡ Q−n V2n
.
(mod N ),
(3.5)
where .QQ−1 ≡ 1 (mod N ) and .Q−n = (Q−1 )n . Also, for any integers s and t, we have .W2s ≡ Ws2 − 2 (mod N ) by (2.24) and .Ws+t ≡ Ws Wt − Ws−t (mod N ) by (2.17). We also have the following results, all modulo N : V2h ≡ Qh Wh , P V2h+1 ≡ Qh+1 (Wh + Wh+1 ), .
DU2h+1 ≡ Qh+1 (Wh+1 − Wh ),
(3.6)
P DU2h ≡ Qh (2QWh+1 − (P 2 − 2Q)Wh ). Thus, if .h = m/2 , we can compute .Vm and .Um modulo N if we know Wh and .Wh+1 (mod N ). Now suppose that .(b0 , b1 , b2 , . . . , bk )2 is the binary representation of h, and put .P0 ≡ {W1 , W2 }, where .W1 ≡ P 2 Q−1 − 2 (mod N ) and .W2 ≡ W12 − 2 (mod N ). Suppose .Pi = {A, B}; if .bi+1 = 0, put .Pi+1 ≡ {A2 − 2, AB − W1 }; if .bi+1 = 1, put .Pi+1 ≡ {AB − W1 , B 2 − 2} (mod N ). We see that .Pk ≡ {Wh , Wh+1 }.
.
Furthermore, given values for .Wh and .Wh+1 (mod N ) and some positive integer t, we can quickly evaluate .Wth (mod N ). If .(b0 , b1 , b2 , . . . , bk )2 is the binary representation of t and .P0 ≡ {Wh , Wh+1 }, we compute .Pk ≡ {Wth , Wt(h+1) } in a similar fashion to the above scheme. For .Pi = {A, B}, we calculate .Pi+1 ≡ {A2 − 2, AB − Wh } (mod N ) when .bi+1 = 0; if .bi+1 = 1, compute .Pi+1 ≡ {AB − Wh , B 2 − 2} (mod N ). We next define the polynomial .Gm (x) for .m ≥ −1 by .G−1 (x) = −1, .G0 (x) = 1, and .Gk+1 (x) = xGk (x) − Gk−1 (x) (.k = 0, 1, 2, . . .). This polynomial is related to the .ψn (x) polynomial of Sylvester [71, p. 366ff]; more information can be found concerning it in Sect. 4.2. It is easy to establish by induction that (y 2m+1 − 1)/(y − 1) = y m Gm (y + y −1 )(m ≥ −1).
.
3.4 Solving Quadratic and Cubic Congruences
65
Note that this holds even when .y = 1 because .Gm (2) = 2m + 1. We also have .Gm (−2) = (−1)m for any m and .Gm (−1) = 1 whenever .3 | m. If we put .r = 2s + 1 and .y = −(α/β)n , we get V
. nr
= (−1)s Qns Gs (−V2n /Qn )Vn ≡ (−1)s Qns Gs (−Wn )Vn
(mod N ); (3.7)
if we put .y = (α/β)n , we get Unr = Qns Gs (V2n /Qn )Un ≡ Qns Gs (Wn )Un
.
(mod N ).
(3.8)
If we refer back to Theorem 55 and put .m = (N − γ)/r, we see by (3.8) that N | UN −γ /U(N −γ)/r if and only if .N | Gs (Wm ). In the case of p odd, we can now restate Theorem 55.
.
Theorem 57 Let N be of the form (3.3), where .n > 1 and .A < pn . If .gcd(N, 2Q) = 1, .m = (N − γ)/p, and .N | Gs (Wm ), where .s = (p − 1)/2, then N is a prime.
3.4 Solving Quadratic and Cubic Congruences Let .f (x) be any polynomial with integer coefficients, and let m be any positive integer. There is a simple algorithm for solving f (x) ≡ 0 (mod m);
.
simply try all possible values of x in the range .0, 1, 2, . . . , m − 1, and record those values which satisfy the congruence. However, this procedure, while perfectly valid, is very inefficient when m is large. More effective techniques can be found in any elementary number theory textbook, but these rely upon the ease with which m can be factored (see Sect. 3.5) and the available routines for solving .f (x) ≡ 0 (mod p), where p is a prime divisor of m. The general problem of solving a polynomial congruence modulo a prime has attracted a considerable body of literature. See, for example, paragraph 4.3 of Lidl and Niederreiter [40]. In this section, we will confine our discussion of this problem to that of solving polynomial congruences of degrees 2 and 3. We first describe how a Lucas function can be employed to solve the congruence 2 .x ≡ a (mod p), (3.9) where p is an odd prime and a is a quadratic residue of p, i.e., the Legendre symbol .(a | p) = 1. See [75, p. 228]. Put .Q = a, and find by trial a value of P such that .(D | p) = −1, where .D = P 2 − 4Q. This latter process might be
66
3 Applications
considered a defect in the method, as it is unknown how many possible values of P we would have to try until we find one such that .(D | p) = −1, but in practice, a suitable value for P appears after only a few trials. By Theorem 36, 2 ≡ 4Q(p+1)/2 we must have .p | U(p+1)/2 . Thus, by (2.8), we get .V(p+1)/2 (mod p). Since .Q(p+1)/2 = aa(p−1)/2 ≡ a (mod p), we see that the roots of (3.9) are given by .±2−1 V(p+1)/2 (mod p). The above idea was first suggested by Cipolla in 1903 and rediscovered by Lehmer in 1969. We note that simpler solutions to (3.9) exist for .p = 4n + 3 and .p = 8n + 5. If .p = 4n + 3, then a2n+2 = aa2n+1 = aa
.
p−1 2
≡ a (mod p).
Thus, .±an+1 (mod p) are the solutions of (3.9). Legendre noticed that if .p = 8n + 5, we have 1 = (a | p) ≡ a
.
p−1 2
= a4n+2
(mod p);
thus, .a2n+1 ≡ ±1 (mod p). In the case of .a2n+1 ≡ 1 (mod p), the solutions of (3.9) are clearly .±an+1 (mod p); in the case of .a2n+1 ≡ −1 (mod p), the solutions are .±(1/2)(4a)n+1 because .
± (1/2)(4a)n+1
2
= 42n+1 a2n+2 = 24n+2 a2n+1 a ≡ −(2 | p)a ≡ a (mod p).
This observation of Legendre was extended to .p = 8n + 1 by Tonelli in 1891. Tonelli’s technique was rediscovered and generalized by Shanks in 1972. We illustrate the Cipolla-Lehmer method for a prime of the form .8n + 1, namely, 89, and .a = 2. Thus, .Q = 2 and .D = P 2 − 8. Trying .P = 1 yields .D = −7 and (−7 | 89) = (89 | 7) = (5 | 7) = (2 | 5) = −1.
.
We need to compute .V45 . Using a variation on what we did in the previous section, i.e., the doubling and side-step formulas .U2n = Un Vn , .V2n = Vn2 − 2Qn , .U2n+1 = 12 (P U2n + V2n ), and .V2n+1 = 12 (DU2n + P V2n ), we obtain 2 n+1 .V2n = Vn − 2 , .U2n+1 = 12 (U2n + V2n ), .V2n+1 = 12 (V2n − 7U2n ), and n .Un .Vn 5 .−1 11 10 .−11 57 11 23 67 22 28 37 44 57 32 45 0 39
3.4 Solving Quadratic and Cubic Congruences
67
so that the solutions are .
±
39 − 89 39 ≡± ≡ ±25 2 2
(mod 89).
(We see that 2 is a fourth power residue modulo 89.) For more information and references concerning the solution of the quadratic congruence, see M¨ uller [53]. We now turn to the problem of solving the cubic congruence f (x) = x3 + ax2 + bx + c ≡ 0
(mod p),
.
(3.10)
where a, b, and c are integers and p (.> 3) is a prime. It may seem surprising, but by using an old idea of Cailler [18], Lucas functions can be used in many cases to solve (3.10). It is well known that if we put .y = a+3x, then .27f (x) = g(y), where .g(y) = y 3 − 3Ay + G, .A = a2 − 3b, and .G = 2a3 − 9ab + 27c. Thus, any solution y of g(y) = y 3 − 3Ay + G ≡ 0
.
(mod p)
(3.11)
can be readily converted to a solution x of (3.10). If .p | A, we are left with the problem of solving y 3 ≡ −G (mod p).
.
(3.12)
If .p ≡ 2 (mod 3), then (3.12) has the solution .y ≡ −G(2p−1)/3 (mod p). If .p ≡ 1 (mod 3), a necessary condition for (3.12) to have a solution is that (p−1)/3 .(−G) = G(p−1)/3 ≡ 1 (mod p). Put .t = (p − 1)/3, and suppose that .3 t (this certainly occurs when .9 p − 1). In this case, there must exist some .c ∈ {1, 2} such that .3 | ct + 1, and it is easy to see that (3.12) has the solution (ct+1)/3 .y ≡ −G (mod p). In what follows, we will extend these ideas to the case where .p A. We first observe that if .p | G2 − 4A3 , then it is easy to see that .y ≡ G(2A)−1 (mod p) is a solution of .g(y) ≡ 0 (mod p); thus, we will assume that .p G2 − 4A3 . It is convenient at this point to make use of the properties of finite fields; let .Fp be the finite field containing p elements, and let .K containing .Fp be the finite field containing .p2 elements. We may suppose that A and .G2 − 4A3 are both nonzero in .K. Also, there must exist .α and .β in .K such that .α + β = G/A and .αβ = A. We have .A2 (α − β)2 = G2 − 4A3 , β. Now let .z = (y − α)/(y − β) = 1, where .y ∈ Fp and which means that .α = 3 .g(y) ≡ 0 (mod p); we have .y = (βz − α)/(z − 1) and .g(y) = h(z)/(z − 1) , 2 3 2 3 where .h(z) = β(α − β) z − α(α − β) . It follows that .βz = α in .K. Put 2 p p .D = (α − β) and .p = (D | p). Since, in .K, .α = α when .p = 1 and .α = β p−p when .p = −1, we see that .z = 1 in .K. Suppose that .3 p − p ; then, as above, there must exist .c ∈ {1, 2} such that .3 | c(p − p ) + 1. Since .z 3 = α/β, we must have .z = (α/β)m ,
68
3 Applications
where .m = (c(p − p ) + 1)/3. Since .y = (βz − α)/(z − 1), we see that .y ≡ QUm−1 (P, Q)Um (P, Q)−1 (mod p) is a solution of (3.11) , where .P ≡ GA−1 (mod p) and .Q = A. Next, suppose that .3 | p − p . In this case, since .z p−p = 1, we must have (p−p )/3 .(α/β) = 1, which is equivalent to .U(p−p )/3 (P, Q) ≡ 0 (mod p). If this latter congruence does not hold, then (3.11) has no solution. If it does hold, then put .t = (p−p )/3, and suppose that .3 t; there must exist .c ∈ {1, 2} such that .3 | ct + 1 and .z = (α/β)m satisfies .z 3 = α/β when .m = (ct + 1)/3; thus, as we reasoned earlier, .y ≡ QUm−1 (P, Q)Um (P, Q)−1 (mod p) is a solution of (3.11). Hence, we can use the Lucas functions to solve (3.11) as long as .9 p − p . By using a method of Williams [76], we can also use Lucas functions to solve (3.11) without needing to compute .Um (P, Q)−1 (mod p). In order to do this, we need a preliminary lemma. As earlier, we assume that .P ≡ GA−1 (mod p), .Q = A, .D = P 2 − 4Q, .p = (D | p) = 0, .η = (Q | p), and .c ∈ {1, 2}. Lemma 22 If t is any divisor of .p − p such that .r = (p − p )/t is odd, then Uct ≡ 0 (mod p) ⇐⇒ Vct ≡ 2η c Qct/2 (mod p).
.
Proof We first observe that since r is odd, we must have t even. By (2.8), it is clear that .p | Uct when .Vct ≡ 2η c Qct/2 (mod p). If .p | Uct , we have .p | Ut or, possibly in the case of .c = 2 and .η = −1, .p | Vt by Theorem 36. In this latter case, .V2t ≡ −2Qt (mod p). By (3.8) and the law of appearance, we get 0 ≡ Up−p ≡ Qts Gs (V2t /Qt )Ut ≡ (−1)s Qts Ut
.
(mod p),
where .s = (r − 1)/2. Hence, we get .Ut ≡ Vt ≡ 0 (mod p), which is impossible by (2.8); thus, we can only have .p | Ut and by (2.8) .Vt ≡ 2θQt/2 (mod p), where .θ = ±1. It follows that .V2t = Vt2 − 2Qt ≡ 2Qt (mod p). By (3.7), we have 2Q(p−p )/2 ≡ Vp−p = Vrt = (−1)s Qts Gs (−V2t /Qt )Vt ≡ 2θQrt/2 .
.
Hence, we must have .θ = η, and we have the lemma.
.
We are now able to prove the following theorem. Theorem 58 Let p, .p , t, and r be defined as in Lemma 22, and suppose that .3 t. Let .c ∈ {1, 2} be such that .3 | ct + 1. If .p | Uct , then .y ≡ −η c P −1 Q(Wk+1 + Wk ) (mod p) is a solution of (3.11), where .k = (ct − 2)/6 and .Wk was defined in (3.5). Proof By Lemma 22, we must have .Vct ≡ 2η c Qct/2 (mod p). By (2.11), we have c ct/2 .2Vct+1 = Vct V1 + DUct U1 ≡ 2η Q P (mod p). Hence, if .m = (ct + 1)/3, we get .V3m ≡ η c P Qct/2 (mod p) and
3.5 Integer Factoring
69
V 3 − 3Qm Vm = V3m ≡ η c P Qct/2
. m
(mod p).
Since m is odd, we have .m = 2k + 1 and .k = (ct − 2)/6. We find that (Vm Q−k )3 − 3Q(Vm Q−k ) ≡ η c P Q
.
or
(mod p)
(−η c Vm Q−k )3 − 3A(−η c Vm Q−k ) + G ≡ 0 (mod p).
.
By the second formula in (3.6), we see that .y ≡ −η c P −1 Q(Wk+1 + Wk ) (mod p) is a solution of (3.11). . Thus, if .p−p ≡ 0 (mod 9), we can always find a solution of (3.10) by using Lucas functions. More results, particularly for the case that .9 | p − p , and additional references concerning solving the cubic congruence can be found in M¨ uller [54]. Example 59 Find a solution of y 3 − 21y − 7 ≡ 0 (mod 41).
.
(3.13)
In this case, we have .p = 41, .P ≡ −1, .Q ≡ 7, and .D ≡ −27 (mod 41). Thus, η = (7 | 41) = −1, .p = (−3 | 41) = −1, and .41 − p = 42. Since .3 | 42 and .9 42, we can put .t = 42/3 = 14 and .c = 1 so that .m = (ct + 1)/3 = 5 and .k = 2. We have .U0 = 0, .U1 = 1, .U2 = −1, .U3 = −6, .U4 = 13, and .U5 = 29. Hence, .y ≡ 7 · 13 · 29−1 ≡ 7 · 13 · 17 ≡ 30 (mod 41) is a solution of (3.13). By results in Sect. 3.3, we also have .W1 ≡ P 2 Q−1 − 2 ≡ 7−1 − 2 ≡ 4 (mod 41), 2 .W2 ≡ W1 − 2 ≡ 14 (mod 41), and .W3 ≡ W1 W2 − W1 ≡ 11 (mod 41). Thus, c −1 .y ≡ −η P Q(Wk+1 + Wk ) (mod 41) ≡ −1 · 7(14 + 11) ≡ 30 is, as we have . already seen, a solution of (3.13). .
3.5 Integer Factoring The integer factoring problem can be stated as follows: Given an integer N > 1, where N is not a prime, find an integer a with .1 < a < N such that a is a divisor of N . This rather simple sounding request has turned out to be an enormous challenge to mathematicians since antiquity, but within the last 50 years, it has become of great importance to the problem of providing secure communication. In this section, we will only discuss the application of the Lucas functions to this problem, but there is much more to integer factorization than what we will discuss here. For further information, the reader is referred, for the early history of the problem, to Williams and Shallit [79] or various chapters of [77] and for modern techniques to [21], Lenstra [38], and Wagstaff [72].
.
70
3 Applications
In 1974, Pollard [58] produced a rather novel approach to this problem. He assumed that N has a prime divisor p, where the largest prime power divisor of .p − 1 is less than or equal to a preassigned bound B. Let .P denote the set of all primes, and for each .q ∈ P, define the nonnegative integer .λ(q) by q λ(q) ≤ B < q λ(q)+1 .
.
Let R be the product of all .q λ(q) for .q ∈ P; this is a finite product because .λ(q) = 0 when .q > B. Also, .p − 1 must be a divisor of R by our assumption. Since .ap−1 ≡ 1 (mod p) for any a such that .gcd(a, N ) = 1, we must have R .a ≡ 1 (mod p), and we find that p must be a divisor of .gcd(aR − 1, N ). For any a such that .gcd(a, N ) = 1, it is relatively easy to compute .aR (mod N ); thus, we can use the above observation to find a factor .gcd(aR − 1, N ) of N , as long as our initial assumption holds. Pollard also discussed a very useful second stage of his algorithm to be used when .p − 1 has a single prime divisor r, where .r < B , a larger bound than B, the upper bound on all the other prime power divisors of .p − 1. It was by making use of Pollard’s idea with 5 7 .B = 6 · 10 and .B = 10 that Baillie (unpublished) discovered a new prime divisor of .M257 in 1980. (See Sect. IIIB2 of Brillhart et al. [15].) Guy [29] mentioned a possible technique, using Lucas functions, for factoring N when .p + 1 has only small prime power factors. This was implemented later by Williams [75]. In this algorithm, we assume that the largest prime power divisor of .p + 1, where p is some prime divisor of N , is less or equal to a preassigned bound B and, as above, let R be the product of all .q λ(q) for .q ∈ P. In this case, we see that .p + 1 must be a divisor of R. If .gcd(Q, N ) = 1 and .(D | p) = −1, then .p | Up+1 (P, Q) by the law of appearance. Hence, as above, we find that .p | UR (P, Q) and therefore .p | gcd(UR (P, Q), N ). As it is more convenient to compute .WR (P, Q) instead of .UR (P, Q), we observe that if .p | UR (P, Q), then .VR2 (P, Q) ≡ 4QR (mod p) by (2.8) and therefore .WR (P, Q) ≡ 2 (mod p) by (2.25). Thus, to find a non-trivial factor of N , we make use of the techniques described in Sect. 3.3 to calculate .WR (P, Q) (mod N ) and then evaluate .gcd(WR (P, Q) − 2, N ). Just as in the case of Pollard’s .p − 1 method, there is a second stage of the .p + 1 method. This can be used when .p + 1 has a single prime divisor r, where .r < B and .B is a larger bound than B. These methods were improved later by Montgomery [50]. Bach and Shallit [3] have extended the .p − 1 and .p + 1 methods to produce a factoring technique which operates under the assumption that .Φk (p) has only small prime power divisors. Here, .Φk (x) denotes the kth cyclotomic polynomial, an irreducible (over the rational numbers) polynomial, of degree k .ϕ(k), divisor of .x − 1. For example, .Φ1 (p) = p − 1, .Φ2 (p) = p + 1, .Φ3 (p) = 2 p + p + 1, .Φ4 (p) = p2 + 1, etc. See Sect. 4.3 for more information concerning the cyclotomic polynomials.
3.6 Diophantine Equations
71
3.6 Diophantine Equations A Diophantine equation is an indeterminate equation whose unknowns are constrained to assume integral (or rational) values. For example, an integral solution of the Diophantine equation .x2 + y 2 = z 2 is .(3, 4, 5). The study of these equations began in antiquity and continues to be an active area of research to this day. While it may appear that these objects are of little importance, they have nevertheless inspired a great deal of very fundamental mathematics; the search for all of the solutions of the Fermat Diophantine equation .xn + y n = z n (.n > 2) was responsible for the development of very sophisticated results involving algebraic geometry, and attempts to solve the equations like .x3 − 2y 3 = n (for a given n) stimulated much research on rational approximations to irrational numbers. For a compendium of results on this topic up to 1920, the reader is referred to the second volume of Dickson [23]; for more modern results and techniques, see Mordell [52], Schmidt [65], Shorey and Tijdeman [63], Smart [66], and Steuding [69]. One of the most studied Diophantine equations is the so-called Pell equation. This is the equation 2 2 .x − dy = 1, (3.14) where d is a given non-square positive integer. It is important to realize that non-trivial (.y = 0) solutions always exist for (3.14), although it is not immediately clear that this is so. For example, .x2 − 19y 2 = 1 has the solution 2 2 .(170, 39), but the smallest value of .|y| such that .x − 1621y = 1 is a number of 74 decimal digits. The Pell equation often turns up in the investigation of other Diophantine equations such as .x3 + y 3 + z 3 = 1 (Lehmer [37]) or 2 2 2 2 2 .(x + a)(y + a) = (az + b ) (Williams [73]). See also Chap. 8 of [52]. A very readable account of the Pell equation can be found in Barbeau [4]. It is well known that all solutions of (3.14) are given by .(Xn , Yn ), where .Xn and .Yn are generated from a fundamental solution .(X1 , Y1 ) by √ √ .Xn + d Yn = (X1 + d Y1 )n for all integral values of n. The problem of how to compute this fundamental solution is discussed in some detail in Jacobson and Williams [32]. If, as noted by Lehmer [35], we put .P = 2X1 and .Q = 1, we find that .D = 4dY12 and 2Xn = Vn (P, Q),
.
Yn = Y1 Un (P, Q).
Thus, we can determine the properties of the solutions of (3.14) from the properties of the Lucas functions. Also, wherever it is possible to use the Pell equation to solve a given Diophantine equation, we will very likely need to appeal to the properties of the Lucas functions. As a simple example, suppose we wish to find a solution of the Pell equation x2 − 931y 2 = 1.
.
(3.15)
72
3 Applications
We observe that .931 = 72 · 19; since the minimal solution of .x2 − 931y 2 = 1 is .(170, 39), we need to find a value of n such that .7 | Un (340, 1). Since .7 = (D | 7) = (19 | 7) = −1 and .(Q | 7) = 1, we see by the law of appearance and Theorem 36 that .n = (7 − 7 )/2 = 4 will work and .x = V4 (340, 1)/2 = 6681448801 and .y = 39U4 (340, 1)/7 = 218975640 are solutions of (3.15). The theory of the Pell equation has attracted a great deal of literature, much of which is cited in [32] and Lenstra [39], to which the interested reader is referred. The Lucas sequences have also appeared as the subject of Diophantine analysis; for example, consider the problem of finding all the Fibonacci numbers that are perfect integral squares. Credit is usually given to J. H. E. Cohn for first proving in 1964 that .F1 = F2 = 1 and .F12 = 144 are the only square Fibonacci numbers. However, Wilhelm Ljunggren had solved the problem more than a decade earlier, using much more sophisticated and general methods. Unfortunately, although he published his papers in English, they appeared in Norwegian venues during and around World War II and were not as well known as they should have been. More recently, the problem of finding all .Fn (and .Ln ) which are perfect integral powers has been solved by Bugeaud, Mignotte, and Siksek [17] using very deep and powerful techniques. (The only additional numbers are .F6 = 8, .L1 = 1, and .L3 = 4.) The paper [17] also has extensive bibliography which we recommend to the interested reader.
3.7 Cryptography Cryptography is the practice of designing and analyzing techniques that assure secure communication in the presence of malicious adversaries. In the last 50 years, cryptography has been the object of considerable (unclassified) research by mathematicians, computer scientists, and electrical engineers. For an overview of this subject, the reader is advised to consult any number of introductory textbooks; in particular, we suggest the books of Buchmann [16] and Stinson [70]. Also, for a more detailed treatment, the comprehensive handbook of Menezes et al. [49] is highly recommended. As both [70] and [49] contain extensive bibliographies, we will refrain from including a lot of references in this section. Since the inception of the Internet, it has become customary to make use of public-key (or two-key) cryptography for securing Internet commerce. In such a scheme, each member of a group of individuals wishing to exchange information will have both a private key and a public key unique to that person. If Alice and Bob are members of such a group and Alice wishes to communicate with Bob, she looks up his encryption key in a public directory and encrypts her message M to him using this key. On receipt of this ciphertext, Bob uses his decryption key to decipher it and produce M . As
3.7 Cryptography
73
an example of such a cryptosystem, consider the so-called RSA system. Each member of the group, say Bob (or a trusted authority acting on Bob’s behalf), selects two large primes p and q of k digits at random, keeps them secret, and computes .N = pq. He also selects at random an integer e .(< N ) such that .gcd(e, ϕ(N )) = 1 .(ϕ(N ) = (p − 1)(q − 1)) and solves the linear congruence .ed ≡ 1 (mod ϕ(N )) by the extended Euclidean algorithm to find d with .0 < d < ϕ(N ). Bob’s public encryption key is the pair .(e, N ), and his private decryption key is d. If Alice wishes to send a secure, numerically encoded message M .(0 < M < N, gcd(M, N ) = 1) to Bob, she computes .C ≡ M e (mod N ) .(0 < C < N ) and sends C to Bob. Bob can recover M from C by calculating C d ≡ M ed ≡ M 1+tϕ(N ) ≡ M
.
(mod N ),
by Euler’s theorem. Since .M < N , it is uniquely determined. This scheme has been the subject of many cryptographic attacks, but with some modifications, it has withstood them all and is still widely used today. See Boneh [10]. Of course, if an adversary can factor the RSA modulus N , then he can break the system. However, in spite of the many improvements to integer factoring algorithms since the announcement of the RSA system in 1977, factoring N when .k = 1024, say, seems still to lie in the distant future. Of course, this statement could become invalid, should some group of clever individuals develop a new and better factoring algorithm or produce a universal quantum computer with a sufficient number of qubits. At this point, the latter scenario seems more likely. For information concerning quantum computers and computing, see Kaye et al. [33]. One of the problems associated with the RSA cryptosystem is the process of selecting p and q. We note that because of the existence of the .p − 1 and .p + 1 factoring techniques, it is essential for the security of the system that each of the four numbers .p ± 1 and .q ± 1 has at least one large prime factor. The problem of producing such p and q was first examined by Williams and Schmid [78], where the use of the primality tests of [14] was advocated. Since then, there have been further developments by Shawe-Taylor [64] and Maurer [48]. This latter paper is a particularly valuable contribution to this problem. In 1993, Smith [67] produced a public-key cryptosystem, called LUC, which was based on Lucas functions. “The basic idea behind LUC is that of providing an alternative to RSA by substituting the calculation of Lucas functions for that of exponentiation. While Lucas functions are somewhat more complex mathematically than exponentiation, they produce superior ciphers.” Nevertheless, the system has some important weaknesses as pointed out by Bleichenbacher et al. [8]. However, it has since been recommended as a possible authentication system and continues to be the object of active research. (See, e.g., Ibrahimpaˇsi´c [30].) If we suppose that N is an RSA
74
3 Applications
modulus and .gcd(QD, N ) = 1, the basic idea behind LUC is the simple result, easily proved from the law of appearance, that .Umψ(N ) (P, Q) ≡ 0 (mod N ) and .Vmψ(N ) (P, Q) ≡ 2 (mod N ), where m is any positive integer and .ψ(N ) = (p2 − 1)(q 2 − 1). In this scheme, Bob computes .ψ(N ) and finds some positive .e < N at random such that .gcd(e, ψ(N )) = 1. As in RSA, the pair .(e, N ) will constitute his public key. He next solves the linear congruence ed ≡ 1
.
(mod ψ(N ))
for his private key d. (This is not exactly what is recommended in [67], but as mentioned in [8], it avoids the problem of message dependence.) For Alice to send a message M .(< N ) to Bob, she first puts .P = M and .Q = 1 and computes .C ≡ Ve (M, 1) (mod N ) and sends C to Bob. Bob can recover M by computing .Vd (C, 1) ≡ M (mod N ). To see why this works, we observe that V (C, 1) ≡ Vd (Ve (M, 1), 1) ≡ Ved (M, 1) = V1+tψ(N ) (M, 1) ≡ M
. d
(mod N )
by (2.21) and (2.11). The latter congruence follows from 2V1+tψ(N ) (M, 1) = V1 (M, 1)Vtψ(N ) (M, 1) + DU1 (M, 1)Utψ(N ) (M, 1)
.
≡ 2M
(mod N ).
The values of C and .Vd (C, 1) can be computed quickly by using the techniques mentioned in Sect. 3.3. We have mentioned that if an adversary can factor N , then the RSA scheme (and LUC) can be broken. This leaves the question of whether breaking RSA is equivalent in difficulty to factoring N . Boneh and Venkatesan [9] have provided evidence which suggests that this is not the case, and Boneh and Durfee [11] have shown that if .d < N 0.292 , then N can be effectively factored. However, Aggarwal and Maurer [1] have proved that breaking RSA is equivalent in difficulty to factoring the modulus under a generic model of computation, but this is a very restrictive model, as it does not exploit the bit representation of elements except for testing equality. There is, nevertheless, a scheme somewhat like LUC for which it can be proved that breaking it is equivalent in difficulty to factoring N . This system, which is described in Sect. 14.2 of [32], makes use of the solutions of a certain Pell equation, which we have seen are essentially given by the Lucas functions. Further information on this system can be found in M¨ uller [55].
References 1. D. Aggarwal and U. Maurer, Breaking RSA generically is equivalent to factoring, IEEE Transactions on Information Theory 62 (2016), 6251– 6259.
References
75
2. M. Agrawal, N. Kayal and N. Saxena, Primes is in P , Annals of Math. 160(2) (2004), 781–793. 3. E. Bach and J. O. Shallit, Factoring with cyclotomic polynomials, Math. Comp. 52 (1989), 201–219. 4. E. J. Barbeau, Pell’s Equation, Springer-Verlag, NY, 2003. 5. P. Berrizbeitia and T. G. Berry, Cubic reciprocity and generalized LucasLehmer tests for primality of A · 3n ± 1, Proc. Amer. Math. Soc. 127 (1999), no. 7, 1923–1925. 6. P. Berrizbeitia, T. G. Berry and J. Tena-Ayuso, A generalization of Proth’s Theorem, Acta Arithmetica 110.2 (2003), 107–115. 7. P. Berrizbeitia and T. G. Berry, Biquadratic reciprocity and a Lucasian primality test, Math. Comp. 73 (2004), 1559–1564. 8. D. Bleichenbacher, W. Bosma and A. K. Lenstra, Some remarks on Lucas-based cryptosystems, Advances in Cryptology-CRYPTO 95, LNCS 963, Springer-Verlag, Berlin, 1995, 386–396. 9. D. Boneh and R. Venkatesan, Breaking RSA may not be equivalent to factoring, Advances in Cryptology-EUROCRYPT’ 98, LNCS 1403, Springer-Verlag, Berlin, 1998, 59–71. 10. Dan Boneh, Twenty years of attacks on the RSA cryptosystem, Notices of the AMS 46 (1999), 203–213. 11. D. Boneh and G. Durfee, Cryptanalysis of RSA with private key d less than N 0.292 , IEEE Transactions on Information Theory 46 (2000), 1339– 1349. 12. W. Bosma, Explicit primality criteria for h · 2k ± 1, Math. Comp. 61 (1993), 97–109. 13. J. Brillhart, Note on representing a prime as sum of two squares, Math. Comp. 26 (1972), 1011–1013. 14. J. Brillhart, D. H. Lehmer and J. L. Selfridge, New primality criteria and factorizations of 2m ± 1, Math. Comp. 29 (1975), 620–647. 15. J. Brillhart, D. H. Lehmer, J. L. Selfridge, B. Tuckerman and S.S. Wagstaff, Jr., Factorizations of bn ± 1, b = 2, 3, 5, 6, 7, 10, 12 Up to High Powers, Contemporary Mathematics, Vol. 22, American Mathematical Society, Providence, RI, 2nd edition, 1988. 16. Johannes Buchmann, Introduction to Cryptography, Undergraduate Texts in Mathematics, Springer-Verlag, Berlin, 2000. 17. Y. Bugeaud, M. Mignotte and S. Siksek, Classical and modular approaches to exponential Diophantine equations. I. Fibonacci and Lucas perfect powers, Ann. of Math. (2) 163 (2006), no. 3, 969–1018. 18. C. Cailler, Sur les congruences du troisi`eme degr´e, Enseign. Math. 10 (1908), 474–487. 19. R. D. Carmichael, On the numerical factors of the arithmetic forms αn ± β n , Ann. of Math. (2) 15 (1913–1914), no. 1-4, 30–48, 49–70. 20. David A. Cox, Primes of the Form x2 + ny 2 . Fermat, Class Field Theory and Complex Multiplication, 2nd Edition, John Wiley & Sons, Inc., New York, 2013.
76
3 Applications
21. Richard Crandall and Carl Pomerance, Prime Numbers: A Computational Perspective, Springer-Verlag, New York, 2001. 22. Y. Deng and D. Huang, Explicit primality criteria for h2n ± 1, J. Th´eor. Nombres Bordeaux 28 (2016), no. 1, 55–74. 23. L. E. Dickson, History of the Theory of Numbers, Dover Publications, New York, 2005. 24. M. Dietzfelbinger, Primality Testing in Polynomial Time, SpringerVerlag, Berlin, 2004. 25. J. Franke, T. Kleinjung, F. Morain and T. Wirth, Proving the primality of very large numbers with fast ECPP, Algorithmic Number Theory, LNCS 3076, Springer-Verlag, Berlin, 2004, 194–207. 26. GIMPS available at https://www.mersenne.org 27. A. Granville, It is easy to determine whether a given integer is prime, Bull. Amer. Math. Soc. 42 (2004), no. 1, 3–38. 28. J. Grosslight, Small skills, big networks: Marin Mersenne as mathematical intelligencer, History of Science 51-3 (2013), 337–374. 29. R. K. Guy, How to factor a number, Congressus Numerantium 16 (1976), 49–89. 30. B. Ibrahimpaˇsi´c, A cryptanalytic attack on the LUC cryptosystem using continued fractions, Mathematical Communications 14 (2009), 103–118. 31. K. Ireland and M. Rosen, A Classical Introduction to Modern Number Theory, Springer-Verlag, NY, 1982. 32. M. J. Jacobson, Jr, and H. C. Williams, Solving the Pell Equation, CMS Books in Mathematics, Springer Science + Business Media, New York, 2009. 33. Philip Kaye, Raymond Laflamme and Michele Mosca, An Introduction to Quantum Computing, Oxford University Press, 2007. 34. D. H. Lehmer, Tests for primality by the converse of Fermat’s theorem, Bulletin of the Amer. Math. Soc. 33 (1927), 327–340. 35. D. H. Lehmer, On the multiple solutions of the Pell equation, Annals of Math. 30 (1928), 66–72. 36. D. H. Lehmer, An extended theory of Lucas’ functions, Annals of Math. 31 (1930), 419–448. 37. D. H. Lehmer, On the Diophantine equation x3 + y 3 + z 3 = 1, J. London Math. Soc. 31 (1956), 275–280. 38. A. K. Lenstra, Integer factoring, Designs, Codes and Cryptography 19 (2000), 101–128. 39. H. W. Lenstra, Jr., Solving the Pell equation, Notices of the AMS 49 (2002), no. 2, 182–192. 40. Rudolph Lidl and Harald Niederreiter, Finite Fields, Addison-Wesley, Reading, MA, 1983. ´ Lucas, Nouveaux th´eor`emes d’Arithm´etique sup´erieure, Comptes Ren41. E. dus Acad. des Sciences, Paris, 83 (1876), 1286–1288. ´ Lucas, Recherches sur plusieurs ouvrages de Leonardo de Pise et sur 42. E. diverses questions d’arithm´etique sup´erieure, Bolletino di Bibliografia e
References
43.
44. 45. 46. 47. 48. 49. 50. 51. 52. 53. 54.
55. 56. 57. 58. 59. 60. 61. 62.
77
di Storia della Scienze Matematiche e Fisiche, 10 (1877), 129–193, 239– 293. ´ Lucas, Consid´erations nouvelles sur la th´eorie des nombres et sur E. la division g´eom´etrique de la circonf´erence en parties ´egales, Assoc. Fran¸caise pour l’Avancement des Sciences. Comptes Rendus, 6 (1877), 159–167. ´ Lucas, Th´eorie des fonctions simplement p´eriodiques, Amer. J. Math. E. 1 (1878), 184–240, 289–321. ´ Lucas, Sur la s´erie r´ecurrente de Fermat, Bolletino di Bibliografia e E. di Storia della Scienze Matematiche e Fisiche, 11 (1878), 783–798. ´ Lucas, Sur le neuvi`eme nombre parfait, Mathesis 7 (1887), 45–46. E. ´ Lucas, Th´eorie des Nombres, Editions ´ E. Jacques Gabay, 1991. (Authorized re-edition of the original 1891 Gauthier-Villars edition.) U. M. Maurer, Fast generation of prime numbers and secure public-key cryptographic parameters, J. Cryptology 8 (1995), 123–155. Alfred J. Menezes, Paul van Oorschot and Scott A. Vanstone, Handbook of Applied Cryptography, CRC Press, Boca Raton, FL, 1997. P. L. Montgomery, Speeding the Pollard and elliptic curve methods of factorization, Math. Comp. 48 (1987), 243–264. F. Morain, Implementing the asymptotically fast version of the elliptic curve primality proving algorithm, Math. Comp. 76 (2007), 493–505. L. J. Mordell, Diophantine Equations, Academic Press, London, 1969. S. M¨ uller, On the computation of square roots in finite fields, Designs, Codes and Cryptography 31 (2004), 301–312. S. M¨ uller, On the computation of cube roots modulo p, High Primes and Misdemeanours: Lectures in Honour of the 60th Birthday of Hugh Cowie Williams, Fields Inst. Communications 41, American Math. Society, Providence RI, 2004, 293–304. S. M¨ uller, Some remarks on Williams’ public-key crypto functions, Fibonacci Quart. 44 (2006), 224–234. P. Ochem and M. Rao, Odd perfect numbers are greater than 101500 , Math. Comp. 81 (2012), 1869–1877. C. Pomerance, J. L. Selfridge and S. S. Wagstaff, The pseudoprimes up to 25 · 109 , Math. Comp. 35 (1980), 1003–1026. J. M. Pollard, Theorems on factorization and primality testing, Proc. Camb. Phil. Soc. 76 (1974), 521–528. R. M. Robinson, The converse of Fermat’s theorem, Amer. Math. Monthly 64 (1957), 703–710. E. L. Roettger, H. C. Williams and R. K. Guy, Some primality tests that eluded Lucas, Designs, Codes and Cryptography 77 (2015), 515–539. E. L. Roettger and H. C. Williams, Lucas-Lehmer primality tests for certain prime curios, Integers 21 (2021), Article A109. E. L. Roettger and H. C. Williams, Some primality conditions for N = 2pn − 1, Integers 22 (2022), Article A76.
78
3 Applications
63. W. M. Schmidt, Diophantine Approximations and Diophantine Equations, Lecture Notes in Mathematics 1467, Springer-Verlag, Berlin, 1991. 64. J. Shawe-Taylor, Generating strong primes, Electronics Letters 22 #16 (1986), 875–877. 65. T. N. Shorey and R. Tijdeman, Exponential Diophantine Equations, Cambridge Tracts in Mathematics 87, Cambridge University Press, 1986. 66. N. Smart, The Algorithmic Resolution of Diophantine Equations, London Mathematical Society Student Texts 41, Cambridge University Press, 1998. 67. P. Smith, LUC public-key encryption: a secure alternative to RSA, Dr. Dobb’s Journal, 1993, 44–48. 68. A. Stein and H. C. Williams, Explicit primality criteria for (p − 1)pn − 1, Math. Comp. 69 (2000), 1721–1734. 69. J. Steuding, Diophantine Analysis, Chapman and Hall/CRC, Boca Raton, FL, 2005. 70. Douglas R. Stinson, Cryptography: Theory and Practice, Third Edition, CRC Press, Taylor and Francis Group, Boca Raton, FL, 2006. 71. J. J. Sylvester, On certain ternary cubic-form equations, Amer. J. Math. 2 (1879), 357–393. 72. S. S. Wagstaff, Jr., The Joy of Factoring, Volume 68 Student Mathematical Library, American Mathematical Society, Providence, RI, 2013. 73. H. C. Williams, Note on a Diophantine equation, Elemente der Mathematik , 25/6 (1970), 123–125. 74. H. C. Williams, The primality of N = 2A3n − 1, Can. Math. Bull. 15 (1972), 585–589. 75. H. C. Williams, A p + 1 method of factoring, Math. Comp. 39 (1982), 225–234. 76. H. C. Williams, Effective primality tests of some integers of the forms A5n − 1 and A7n − 1, Math. Comp. 48 (1987), 385–403. ´ 77. H. C. Williams, Edouard Lucas and Primality Testing, Canadian Math. Soc. Series of Monographs and Advanced Texts, John Wiley and Sons, NY, 1998. 78. H. C. Williams and B. Schmid, Some remarks concerning the M.I.T. public-key cryptosystem, BIT 19 (1979), 525–538. 79. H. C. Williams and J. O. Shallit, Factoring integers before computers, Mathematics of Computation: A Half-Century of Computational Mathematics, Proc. Symposia in Applied Mathematics Vol. 48, AMS, Providence RI, 1993, 481–531.
Chapter 4
Some Further Properties of the Lucas Sequences
I have to change to stay the same.
(Willem de Kooning)
Knowledge comes from experience, all the rest is information.
(Albert Einstein)
Abstract This chapter is a compilation of some miscellaneous results involving the Lucas sequences. We begin with a discussion of the relationship of the Lucas sequences to the sine and cosine functions and then describe the periodicity properties of U and V modulo an integer m. This is followed by a section devoted to the relationship of the Lucas sequences to the Chebyshev and the Dickson polynomials. We then review some additional arithmetic properties of the Lucas sequences that are not covered in Chap. 2 and establish what Lucas called his fundamental theorem. Subsequently, we provide some insights on the factorization of the terms of U . Next, we describe Lehmer’s extension of Lucas’ sequences and examine some of their properties. The following section makes use of our earlier factorization results to prove an old theorem of Carmichael on primitive divisors of (.Un ) and of the Lehmer sequences. We conclude with a brief treatment of the topic of when the Lucas sequence U can contain a complete set of residues modulo an integer m.
4.1 Connection with the Circular Functions Lucas was particularly struck by the similarity of his functions to the sine and cosine functions; in fact, in Sect. II of [16], he proved that if i is used to denote a root of .x2 + 1, then √ n/2 .Un = (2Q / −D) sin[(ni/2) log(α/β)]
© Springer Nature Switzerland AG 2023
C. J.-C. Ballot, H. C. Williams, The Lucas Sequences, CMS/CAIMS Books in Mathematics 8, https://doi.org/10.1007/978-3-031-37238-4 4
79
80
4 Further Properties
and V = 2Qn/2 cos[(ni/2) log(α/β)].
. n
He did this by putting .z = n log(α/β)/2 in the well-known analytic formulas .
sin(iz) = −(ez − e−z )/2i
and cos(iz) = (ez + e−z )/2.
As both sine and cosine are singly periodic functions with period .2π, Lucas (Sect. XXVI of [16]) seemed to regard .Un and .Vn as simply periodic numerical functions, where for any particular modulus m, the (numerical) period in this case is the least positive integer .τ = τ (m) such that both Un+τ ≡ Un
.
(mod m)
and
Vn+τ ≡ Vn
(mod m)
hold. This explains the title of [16]. He considered the above formulas as the analogues of those conveying the periodicity of the circular functions: .
sin(x + 2π) = sin x
and
cos(x + 2π) = cos x.
Although Lucas was aware of the numerical periodicity of his functions modulo m, he really only proved his above numerical periodicity results when m is a prime. We will now show by a very simple process that they hold for any m such that .gcd(m, Q) = 1. Let .(Xn ) be any sequence satisfying the recursion relation (2.1), i.e., Xn+2 = P Xn+1 − QXn
.
for n ≥ 0.
If we put .Ti = (Xi , Xi+1 ), .c11 = 0, .c12 = −Q, .c21 = 1, and .c22 = P , then T = Ti C, where .C = (cij )2×2 . Note that C is the companion matrix of 2 .x −P x+Q and the determinant of C, or .det(C), is Q. It follows by induction that .Tn = T0 C n . We now assume that m is a fixed positive integer. Since there are only a finite number of residues of the integers modulo m, by the Dirichlet pigeonhole principle, there must exist some r (.> 0) and s (.≥ 0) such that .C r+s ≡ C s (mod m); hence, .Tr+s ≡ Ts (mod m). Notice that the values of r and s here are independent of the initial vector .T0 . When .det(C) is relatively prime to m, we see that C is invertible modulo m and therefore .Cr ≡ I (mod m), where I is the .2 × 2 identity matrix; in this case, we may put .s = 0. Since for any .i ≥ 0, the vector .Ti+1 (mod m) depends only on the vector .Ti (mod m), we must have . i+1
≡ Tn
(mod m)
for all n ≥ s,
Xn+r ≡ Xn
(mod m)
for all n ≥ s.
T
. n+r
and therefore, .
We call the finite sequence .(X0 , X1 , . . . , Xr−1 ) a period of .(Xn ) modulo m and r the length of this period.
4.2 The Chebyshev and Dickson Polynomials
81
Let .τ ≥ 1 (.τ = τ (m)) be the minimal possible value for r. Suppose that for some .ω > 0, we have Xn+ω ≡ Xn
.
(mod m),
for all sufficiently large .n ≥ 0. Let .ω = qτ + ρ, where .0 ≤ ρ < τ . We have Xn+qτ +ρ ≡ Xn (mod m), which means by definition of .τ that we must have .Xn+ρ ≡ Xn (mod m) for all sufficiently large n. If .ρ > 0, this contradicts the definition of .τ ; hence, we must have .τ | ω, and therefore, any period length of .(Xn ) modulo m must be divisible by .τ (m). When .gcd(m, Q) = 1, we must have .Xn+τ ≡ Xn (mod m), .
for all .n ≥ 0. That is, the sequence .(Xn ) is purely periodic modulo m with period .(X0 , X1 , . . . , Xτ −1 ). Since this is true independent of the initial vector .T0 , it must hold for both .T0 = (0, 1) and .T0 = (2, P ), which shows that Lucas’ periodicity conditions hold for any m such that .gcd(m, Q) = 1. Also, if .X = U , we see on putting .n = 0 above that the rank of appearance .ρ of m must, by Theorem 8, be a divisor of .τ .
4.2 The Chebyshev and Dickson Polynomials The Chebyshev polynomials crop up in just about all areas of numerical analysis. In particular, they are very important in such subjects as orthogonal polynomials, polynomial approximation, numerical integration, and spectral methods. A broad, up-to-date treatment of them can be found in Mason and Handscomb [19]. Our principal concern in this section will be the connection between these objects and the Lucas functions. To begin, we recall the addition formulas for sine and cosine mentioned in Sect. 2.2. If we put .x = nθ and .y = θ and then .y = −θ, we get .
sin(n+1)θ = sin nθ cos θ +cos nθ sin θ, cos(n+1)θ = cos nθ cos θ −sin nθ sin θ
and .
sin(n−1)θ = sin nθ cos θ−cos nθ sin θ, cos(n−1)θ = cos nθ cos θ+sin nθ sin θ.
On adding, we get sin(n + 1)θ = 2 sin nθ cos θ − sin(n − 1)θ, cos(n + 1)θ = 2 cos nθ cos θ − cos(n − 1)θ.
.
(4.1)
We observe that since .sin 2θ = 2 sin θ cos θ, cos 2θ = 2 cos2 θ − 1, we can easily prove by induction that for any fixed nonnegative n, there exist integer constants .ai , .bi (.i = 0, 1, 2, . . . , n) such that
82
4 Further Properties
.
sin(n + 1)θ = sin θ
n
i
ai (cos θ) ,
cos nθ =
i=0
n
bi (cos θ)i .
i=0
It follows that for each nonnegative integer n, there exist two polynomials of degree n with integer coefficients, .Tn (x) and .Un (x), such that .
sin(n + 1)θ = sin θ · Un (cos θ),
cos nθ = Tn (cos θ).
We call .Tn (x) the Chebyshev polynomial of the first kind and .Un (x) the Chebyshev polynomial of the second kind. Note that .T0 (x) = U0 (x) = 1, .T1 (x) = x, and .U1 (x) = 2x. Also, from (4.1), it is easy to deduce that T
. n+1
(x) = 2xTn (x)−Tn−1 (x)
and
Un+1 (x) = 2xUn (x)−Un−1 (x), (4.2)
(n = 1, 2, 3, . . . ). From the initial conditions on .Tn and .Un and (4.2), we find that .2Tn (x) = Vn (2x, 1), Un (x) = Un+1 (2x, 1). (4.3)
.
These are the relationships which connect the Chebyshev polynomials to the Lucas functions with .P = 2x and .Q = 1. Thus, any identity involving the Lucas functions can be used to find a corresponding identity which involves the Chebyshev polynomials. For example, from (2.8), we get T (x)2 − (x2 − 1)Un−1 (x)2 = 1;
. n
hence, by the results in Sect. 3.6, we see that the successive solutions of the Pell equation with .d = x2 − 1, starting with .(x, 1), are provided by m .(Tn (x), Un−1 (x)) with .n ≥ 1. Also, since .Vmn (P, Q) = Vn (Vm , Q ) by (2.21), we see that .Tmn (x) = Tn (Tm (x)); this result is an important ingredient in a public-key encryption scheme promoted by Kocarev et al. [11]. By the first identity in (2.26), we have .Vn = Un+1 − QUn−1 ; hence, by (4.3), we get 2Tn (x) = Un (x) − Un−2 (x).
.
(4.4)
Notice that the derivatives .T1 (x) = 1 = U0 (x) and .T2 (x) = 4x = 2U1 (x). (x) = (n − 1)Un−2 (x); this is Suppose that .Tn (x) = nUn−1 (x) and .Tn−1 certainly true for .n = 2. If we take the derivative with respect to x of the first formula of (4.2), we get T
. n+1
(x) = 2Tn (x) + 2xTn (x) − Tn−1 (x) = Un (x) − Un−2 (x) + 2xnUn−1 (x) − (n − 1)Un−2 (x)
= Un (x) + n(2xUn−1 (x) − Un−2 (x)), by our supposition and (4.4). By the second formula of (4.2), we find that T (x) = (n + 1)Un (x); thus, we have proved by induction that
. n+1
T (x) = nUn−1 (x)
. n
(n = 1, 2, 3, . . .).
(4.5)
4.2 The Chebyshev and Dickson Polynomials
83
Some years ago, some use was made of the modified Chebyshev polynomials, .Cn (x) and .Sn (x); these were defined as Cn (x) = 2Tn (x/2),
Sn (x) = Un (x/2).
(4.6)
Sn (x) = Un+1 (x, 1);
(4.7)
.
We note from (4.3) that Cn (x) = Vn (x, 1),
.
hence, .C0 (x) = 2, .S0 (x) = 1, .C1 (x) = x = S1 (x), and Cn+1 (x) = xCn (x) − Cn−1 (x),
.
Sn+1 (x) = xSn (x) − Sn−1 (x),
(4.8)
for .n ≥ 1. Although these degree n polynomials are monic for .n > 0 and have some nice algebraic properties, they never seemed to catch on with the numerical analysis community (see [19, p. 11]). Also, the S and C notation seems to have been largely abandoned, and it is now customary to use .Ω instead of C and V instead of S. Several properties and applications of .Ωn (x) and .Vn (x), together with references, can be found in Witula and Slota [40]. We will prove some results concerning them below, but because of possible confusion between .Vn (x) and .Vn (x, 1), we will revert back to the earlier notation. We first note that Ωn (x + x−1 ) = Cn (x + x−1 ) = Vn (x + x−1 , 1) = xn + x−n ; .
Sn (x + x−1 ) = Un+1 (x + x−1 , 1) = (xn+1 − x−n−1 )/(x − x−1 ).
(4.9)
By the Girard-Waring formula (2.37), we have for .n > 0 n/2
Cn (x) =
.
(−1)k
k=0
n − k n−2k n . x n−k k
(4.10)
By the first formula of (4.6) and (4.5), we can easily derive .Cn (x) = nSn−1 (x); hence, by differentiating (4.10), we can readily deduce that
n/2
Sn (x) =
.
k=0
(−1)k
n − k n−2k . x k
(4.11)
Note that by putting .x = (α/β)m/2 = αm /Qm/2 , then (4.9) together with (4.10) and (4.11) can be used to derive multiplication formulas for the Lucas functions. Additional formulas can be found by putting .x = αm /(−Q)m/2 ; for example, when n is positive and .n = 2r, we can use the second formula of (4.9), formula (4.11), and sum over .j = r − k − 1 to obtain U2rm = Vm
.
r−1 r+j 2j+1 . Dj Qm(r−j−1) Um r − j − 1 j=0
(4.12)
84
4 Further Properties
Other, similar formulas can also be derived in this way. See Sect. 4.2 of [39]. We also see from (2.21) and (4.7) that Cnm (x) = Cm (Cn (x)).
.
(4.13)
The degree n polynomial .Gn (x) introduced in Sect. 3.3 satisfies the same recurrence as .Sn (x). Thus, since .1 = G0 (x) = S0 (x) + S−1 (x) and .x + 1 = G1 (x) = S1 (x) + S0 (x), it is easy to see that Gn (x) = Sn (x) + Sn−1 (x),
.
(4.14)
for .n ≥ −1. By using (4.14) and (4.11), we find that n
Gn (x) =
.
(−1)i/2
i=0
n − (i + 1)/2 n−i x . i/2
Also, by (4.14) and the second formula of (3.8), we get Gn (x) + Gn−1 (x) = (x + 2)Sn−1 (x),
.
(4.15)
and by (4.4) and (4.6), we have Gn (x) − Gn−1 (x) = Cn (x);
.
(4.16)
from this result, it follows easily that we can write Gn (x) = 1 +
n
.
Cj (x).
(4.17)
j=1
Since, by (2.16), we have Un+m (x, 1) = Vn (x, 1)Um (x, 1) − Um−n (x, 1),
.
we can use (4.7) to derive Sn+m−1 (x) = Cn (x)Sm−1 (x) − Sm−n−1 (x),
.
Sn+m (x) = Cn (x)Sm (x) − Sm−n (x). On adding these and using (4.14) and (4.16), we get the addition formula for Gn (x):
.
Gm+n (x) = Gn (x)Gm (x) − Gn−1 (x)Gm (x) − Gm−n (x).
.
(4.18)
Particular instances of this formula are G2m+2 (x) = Gm+1 (x)2 − Gm+1 (x)Gm (x) − 1, .
G2m+1 (x) = Gm+1 (x)Gm (x) − Gm (x)2 + 1.
(4.19)
4.2 The Chebyshev and Dickson Polynomials
85
Also, since .Gm−1 (x) = xGm (x) − Gm+1 (x), we have G2m (x) = Gm+1 (x)Gm (x) − (x − 1)Gm (x)2 − 1.
.
(4.20)
Formulas (4.19) and (4.20) can be used in the manner discussed in Sect. 3.3 to produce a fast method to compute .Gn (x) for large values of n; this, in view of (3.7) and (3.8), provides a rapid technique for computing the Lucas quotients .Vrn /Vn and .Urn /Un (mod N ) when r is large and odd. We next turn our attention to the Dickson polynomials. These polynomials are generally used in the study of finite fields, where they provide many examples of permutation polynomials; such polynomials induce permutations on the finite field .Fq of q elements. Much more concerning this topic can be found in Chap. 7 of Lidl and Niederreiter [14] and in Mullen and Panario [21]. We will confine our discussion here to the relationship between the Dickson polynomials and the Lucas functions. For a positive integer n and a fixed .a ∈ Fq , we define the nth Dickson polynomial of the first kind .Dn (x, a) over .Fq by n/2
Dn (x, a) =
.
(−a)k
k=0
n − k n−2k n . x n−k k
We define the nth Dickson polynomial of the second kind .En (x, a) over .Fq by n/2 k n−k .En (x, a) = (−a) xn−2k . k k=0
Notice that these polynomials are monic and of degree n over .Fq . From the definitions, we see immediately from (2.34) and (2.30) that Dn (x, a) = Vn (x, a),
.
En (x, a) = Un+1 (x, a).
(4.21)
Many characteristics of the Dickson polynomials can be found in Lidl et al. [15], but in view of (4.21), several of these can be derived from the properties of the Lucas functions. For example, we have .D0 (x, a) = 2, .E0 (x, a) = 1, and .D1 (x, a) = x = E1 (x, a), and from (4.21) and (2.1), we get the recursive formulas: Dn+1 (x, a) = xDn (x, a)−aDn−1 (x, a), En+1 (x, a) = xEn (x, a)−aEn−1 (x, a).
.
From (4.3), it is easy to see that the Dickson polynomials are related to the Chebyshev polynomials by Dn (2x, 1) = 2Tn (x),
.
En (2x, 1) = Un (x).
86
4 Further Properties
From the remarks in Sect. 3.7 and earlier in this section, the above relationships suggest that the Dickson polynomials could be applied to public-key cryptography; indeed, this was done as early as 1981 by M¨ uller and N¨obauer [22]. For a more modern treatment of several of the two-key cryptosystems mentioned in this section and in Sect. 3.7, the reader is referred to Brandner [3].
4.3 Some Additional Arithmetic Properties of the Lucas Sequences In Chap. 2, we derived a number of arithmetic properties of the Lucas sequences, but there are many more such results. In this section, we will detail some of these. We set out by observing that if n, .m ≥ 1 and m is odd, then by Theorem 4, we have .Vn | Vmn . Furthermore, by (2.36), we find that V
. mn
/Vn ≡ (−1)(m−1)/2 Qn(m−1)/2
(mod Vn );
hence, .
gcd(Vmn /Vn , Vn ) | mQn(m−1)/2 .
There is a similar result for U . Theorem 60 If .n, m ≥ 1, we have .
gcd(Umn /Un , Un ) | mQnm/2 .
Proof If m is odd, we have from (2.38) Umn /Un ≡ mQn(m−1)/2
.
(mod Un ),
and the result follows easily in this case. We now turn to the case of m even. If .m = 2r, we get Umn /Un ≡ rVn Qn(r−1)
.
(mod Un )
by (4.12). It follows that .gcd(Umn /Un , Un ) | gcd(rVn Qn(r−1) , Un ). Since gcd(rVn Qn(r−1) , Un ) must divide .rQn(r−1) gcd(Vn , Un ), we see that .gcd(Umn / rn .Un , Un ) must divide .2rQ by Lemma 4. The result now follows for even m. . .
If U is regular (.gcd(P, Q) = 1), then, by Lemma 3, we have .
gcd(Vmn /Vn , Vn ) = 1 and gcd(Umn /Un , Un ) | m.
These results seem not to have been known to Lucas; the latter was first proved for m a prime by Carmichael in [7, p. 51], using a different approach.
4.3 Additional Arithmetic Properties
87
We next look at Lucas’ [16, Sect. XXVI] generalization of Euler’s .ϕ function (see also the discussion in Sect. 2.6). For any U and any prime p such that .p Q, we define .ϕU (pk ) by .ϕU (pk ) = pk−1 (p − p ), where .p is the value of the Legendre symbol .(D | p). By our results in Sects. 2.4 and 2.5, we have .pk | Uf , where .f = ϕU (pk ). If .n ≥ 1 and .gcd(n, Q) = 1, we define the multiplicative function .ϕU (n) as .ϕU (n) = ϕU (pk ), where the product is taken over all .pk such that .pk || n. Notice that if D is a perfect square and .gcd(n, QD) = 1, we have .ϕU (n) = ϕ(n). For any positive integer n coprime to Q, we have .n | UϕU (n) , and therefore, by Theorem 8, we get .ρ(n) | ϕU (n). We observe further that if we define .Λ(n) to be the least common multiple of .ϕU (pk ) for all .pk such that .pk || n, then we must have .n | UΛ(n) and .ρ(n) | Λ(n). If n is odd and .gcd(n, QD) = 1, then .2 | ϕU (pk ); thus, in this case, .Λ(n) | ϕU (n)/2t−1 , where t is the number of distinct prime divisors of n. We next establish the following technical lemma. Lemma 23 If n is odd, .gcd(n, QD) = 1, and n has .t ≥ 2 distinct prime factors, then .ϕU (n)/2t−1 ≤ n − 1. Proof Since .t ≥ 2, we have p ϕU (n) 4 1 1 t−2 = 1− . = · 2t−1 ; ≤ 1+ 1+ 2 n p 3 5 5 it follows that .ϕU (n)/2t−1 ≤ 4n/5 < n − 1, because n has at least 2 distinct odd prime factors and must, as a consequence, be at least as large as 15. . We are now able to prove the theorem whose proof gave Lucas so much trouble. Theorem 61 Suppose U is regular. If n is odd, .gcd(n, Q) = 1, and .ρ(n) = n − γ, where .|γ| = 1, then n is a prime. Proof Suppose n is composite and that .gcd(n, D) > 1. We must have some odd prime q such that .q | n and .q | D. Since .q | Un−γ , we must have .ρ(q) | n−γ by Theorem 8. Also, by Theorem 9, we have .ρ(q) = q, which is impossible because .gcd(n, n − γ) = 1. It follows that we must have .gcd(n, D) = 1. Since .ρ(n) | Λ(n) and .Λ(n) ≤ ϕU (n)/2t−1 < n − 1 by the lemma, we get a . contradiction. The above result can be used to prove Lucas’ fundamental theorem mentioned in Sect. 3.2. Theorem 62 If n is odd, U is regular, and .n | Un−γ , where .|γ| = 1, but n Ud for all aliquot divisors d of .n − γ, then n is a prime.
.
88
4 Further Properties
Proof Since U is regular, by Lemma 2, we have .gcd(Un , Q) = 1. Also, since n Ud for all aliquot divisors d of .n − γ, we must have .ρ(n) = n − γ. The . theorem now follows from Theorem 61.
.
We next concern ourselves with how the numbers in the Lucas sequence U can be factored. As pointed out in Sect. 3.5, the general problem of integer factorization is considered to be very difficult, but, as noticed by Carmichael [7], the Lucas functions .Un possess some distinctive properties, which allow them to be represented as a product of some special integers. In order to find this representation, we first consider the cyclotomic polynomials .Φn (x), mentioned at the end of Sect. 3.5, in greater detail. We define .Φn (x) to be the unique polynomial with integer coefficients which divides .xn − 1, but does not divide .xk − 1 for any positive integer .k < n. The roots of .Φn (x) must therefore be the .ϕ(n) primitive nth roots of unity, and we can write .Φn (x) = (x − ζ k ) (4.22) where .ζ is some primitive nth root of unity (.e2πi/n is such a root) and the product is taken over all integral .k ≥ 1 such that .gcd(k, n) = 1 and .k < n. It follows that .Φn (x) is monic and its degree is .ϕ(n). We also see that since . ϕ(d) = n, (4.23) d|n
we get xn − 1 =
.
Φd (x),
(4.24)
d|n
where the product is taken over all the positive divisors d of n. Furthermore, Gauss showed that the cyclotomic polynomials are irreducible over the rationals (see, e.g., Weintraub [37]). Let .μ denote the M¨obius function defined by .μ(1) = 1 and for .n ≥ 2 μ(n) = 1, if n is square-free with an even number of prime factors.
.
μ(n) = −1, if n is square-free with an odd number of prime factors. μ(n) = 0, if n has a squared prime factor. By M¨ obius inversion applied to functions written as products, we find from (4.24) that .Φn (x) = (xd − 1)μ(n/d) = (xn/d − 1)μ(d) = (1 − xn/d )μ(d) , (4.25) d|n
d|n
d|n
where, as before, the product is taken over all the positive divisors d of n. The last equality in (4.25) follows from . d|n μ(d) = 0 when .n > 1. For more information concerning .Φn (x) and examples, see Appendix 6 of Riesel [25];
4.3 Additional Arithmetic Properties
89
results involving the M¨ obius function can be found, for example, in Sect. 3.5 of Shapiro [30]. We now define the sequence of numbers .(Qn )n≥1 , called the cyclotomic numbers associated with .Un (P, Q), by putting .Q1 = 1 and for .n ≥ 2, .Qn = Qn (α, β) = (α − ζ k β), (4.26) where .ζ is some primitive nth root of unity and the product is taken over all integral .k ≥ 1 such that .gcd(k, n) = 1 and .k < n. For example, .Q2 = α + β = P and .Q3 = α2 + αβ + β 2 = P 2 − Q. By (4.22), we have for .n ≥ 2 Qn = Qn (α, β) = β ϕ(n) Φn (α/β).
.
(4.27)
Thus, .Qn (α, β) can be regarded as a polynomial in .α and .β with integral coefficients. If we put .x = α/β in (4.22), we see by (4.27) that n .(α/β) − 1 = (α/β − 1)Q1 β −ϕ(d) Qd , where the product is taken over all divisors .d ≥ 2 of n. By (4.23), we find that .Un = Qd . (4.28) d|n
Notice that if .n > 2 and .1 ≤ k < n, then .1 ≤ n − k < n and .gcd(k, n) = k, where the sum is taken over all integral gcd(n − k, n). It follows that .n | .k ≥ 1 such that .gcd(k, n) = 1 and .k < n. Thus, if .n > 2, we have .2 | ϕ(n), and we can write (4.26) as .Qn (α, β) = (α − ζ k β) = (ζ k β − α) = (β − ζ −k α) (β − ζ k α) = Qn (β, α). = (β − ζ n−k α) = Since .Qn (α, β) is an integral polynomial in .α, β and symmetric with respect to .α, β, we see that for any integers P and Q, we must have .Qn an integer for .n ≥ 1. Hence, the formula (4.28) expresses .Un as a product of integers. At this point, we should mention that Lucas [17, 18] observed that certain formulas for .Φn (x), which he attributed to Aurifeuille and Le Lasseur, could be used to derive identities involving the Lucas sequences and for factoring some of these expressions. For example, in [18], he gave the identity V
. 10n
/V2n = (V4n + 5Qn V2n + 7Q2n )2 − 10Qn (V3n + 2Qn Vn )2 .
He derived this from the Aurifeuillian formula Φ20 (x) =
.
x10 + 1 = (x4 + 5x3 + 7x2 + 5x + 1)2 − 10x(x3 + 2x2 + 2x + 1)2 , x2 + 1
90
4 Further Properties
by putting .x = αn /β n , where .α + β = P and .αβ = Q. Notice that this formula for .V10n /Vn will factor as a difference of squares when .10Qn is a perfect square. This means that n should be odd and .Q = 10L2 , where L is an integer. Other results, apparently not known to Lucas, can be found by substituting other expressions involving .αn /β n for x in Aurifeuillian formulas. As an example, consider Φ5 (x) =
.
x5 − 1 = (x2 + 3x + 1)2 − 5x(x + 1)2 , x−1
a formula known to Lucas. If we put .x = (−αn /β n )1/2 , we get .
V5n = (Vn2 − 5Qn )2 + 5Qn DUn2 Vn = (DUn2 − Qn )2 + 5Qn DUn2 .
If .−5Qn D is a perfect integral square, we have a factorization of .V5n /Vn . Suppose we have integers M , L, and S such that M 2 + 4L2 = 5S 2 ,
.
and put .P = M and .Q = −L2 . We find that .D = 5S 2 and .−5Qn D = −25(−L2 )n , a perfect square when n is odd. If we consider the special case of .M = L = S = 1, we get the pretty identity found by Jarden [10, Sect. 8]: L5n /Ln = (5Fn2 − 5Fn + 1)(5Fn2 + 5Fn + 1),
.
for an odd n. This result was enlisted by Brillhart, Montgomery, and Silverman [4] to assist in compiling a table of integer factorizations of Lucas numbers. It has been generalized recently by Roettger and Williams [26]. For recent information concerning Aurifeuillians and additional references, the reader is advised to consult Granville and Pleasants [9] and Wagstaff [34, Sect. 4.1]. For some historical commentary, see [39, pp. 126–127, 318–319]. Let N be any odd positive integer. In Sect. 3.2, we defined N to be a base a pseudoprime if N is composite and satisfies .gcd(a, N ) = 1 and (3.1). It is a remarkable fact that there exist composite N which satisfy (3.1) for all a such that .gcd(a, N ) = 1; such numbers are called absolute pseudoprimes or, more frequently, Carmichael numbers. It has been known since 1899 (Sect. 3.3.2 of Crandall and Pomerance [8]) that a positive integer N is a Carmichael number if and only if N is composite and square-free and such that .p − 1 | N − 1 for each prime p which divides N . For example, .N = 561 = 3 · 11 · 17 is the smallest Carmichael number. These numbers have been tabulated by Pinch [24] up to .1021 .
4.4 The Lehmer Sequences
91
We also mentioned in Sect. 3.2 the definition of a Lucas pseudoprime; we can extend this to a Lucas function analogue of the Carmichael numbers as follows: For a fixed D, we say that a composite N is an absolute Lucas Dpseudoprime if for all P and Q such that .gcd(P, Q) = gcd(N, QD) = 1 and .P 2 − 4Q = D, we have UN − (N ) (P, Q) ≡ 0 (mod N ),
.
where .(N ) is the value of the Jacobi symbol .(D | N ). In Williams [38], it was shown that if for a fixed D, N is an absolute Lucas D-pseudoprime, it is necessary that N be square-free and .p − p | N − (N ) for each prime divisor p of N . Since .ρ(p) | p − p , these conditions are also clearly sufficient for N to be an absolute Lucas D-pseudoprime. Thus, we see that an absolute Lucas 1-pseudoprime must be a Carmichael number, and therefore, the absolute Lucas D-pseudoprimes represent a special case of the Carmichael numbers. Very recently, Webster and Gurovski [36] have computed all the absolute Lucas 5-pseudoprimes up to .1015 . It is still unknown whether there exist any N and D such that .(D | N ) = (N ) = −1 and N is both a Carmichael number and an absolute Lucas D-pseudoprime. It is shown in [38] that such values of N must be the product of an odd number of distinct primes p satisfying 16 .p − 1 | N − 1 and .p + 1 | N + 1. A search up to .10 conducted by Pinch [23] did not produce such an N . More recent work of McIntosh and Dipra [20] extended this bound to .2 × 1019 , but still found no value for N . Many refinements of the ideas presented here, together with several references, can also be found in [20, 23] and Shallue and Webster [29].
4.4 The Lehmer Sequences Suppose R, .Q = 0 and .gcd(R, Q) = 1. In [12], √ Lehmer extended the regular Lucas sequences by replacing the integer P by . R, where R is an integer. In this case, we have .D = R − 4Q, which means that D can be 2 or .3 (mod 4), something that is impossible for the Lucas sequences. Of course,√if R is not √ a perfect square, then we see from (2.1) that .Un ( R, Q) and .Vn ( R, Q) are not always going to be integers for .n ≥ 1. If we define √ √ √ ¯n (R, Q) = Un ( R, Q), V¯n (R, Q) = Vn ( R, Q)/ R (2 n) .U and √ √ ¯n (R, Q) = Un ( R, Q)/ R, U
.
√ V¯n (R, Q) = Vn ( R, Q)
(2 | n),
¯n (R, Q)) and .(V¯n (R, Q)) satisfy then it is easy to see from (2.18) that both .(U the fourth-order recurrence
92
4 Further Properties
Xn+4 = (R − 2Q)Xn+2 − Q2 Xn .
.
¯0 (R, Q) = 0, .U ¯1 (R, Q) = U ¯3 (R, Q) = R − Q, and ¯2 (R, Q) = 1, .U Since .U ¯2 (R, Q) = R − 2Q, .V¯3 (R, Q) = R − 3Q, V¯ (R, Q) = 2, .V¯1 (R, Q) = 1, .V √ √ we see by induction that .Un ( R, Q) and .Vn ( R, Q) will always be integers whenever .n ≥ 0. ¯ = (U¯n (R, Q)) and .V¯ = (V¯n (R, Q)) the Lehmer We call the sequences .U sequences. Since the identity relations given in Chap. 2 hold for non-integral values of P and Q, it is possible to derive several properties of these sequences which are analogous to corresponding results concerning the Lucas sequences. For example, we easily find from (2.23) and (2.24) that
. 0
¯2n (R, Q) = V¯n (R, Q) · U ¯n (R, Q); U V¯2n (R, Q) = V¯n (R, Q)2 − 2Qn , if 2 | n; V¯2n (R, Q) = R V¯n (R, Q)2 − 2Qn , if 2 n;
.
From the identity (2.8), it is easy to derive ¯n2 = 4Qn , RV¯n2 − DU
.
whenever n is odd, and ¯ 2 = 4Qn , V¯ 2 − DRU n
. n
whenever n is even. Indeed, if s denotes an odd integer, we can produce the additional identities ¯s+1 = Qs−1 , ¯s−1 U V¯ 2 − DU ¯ 2 − V¯s−1 V¯s+1 = −RQs−1 , DU s
. s
which will be useful in Sect. 8.5. These follow from the easily verified Lucas sequence identities V 2 − DUn+1 Un−1 = P 2 Qn−1 = Vn−1 Vn+1 − DUn2 .
. n
¯ is a strong divisibility sequence and Lehmer was also able to show that .U ¯ , then .ω | n if .ω = ω(m) is the rank of appearance of the integer m in .U ¯ whenever .m | Un (R, Q). Using (2.28) and (2.29), he also showed that if p is an odd prime and .p Q, then ¯p ≡ (D | p) = p U
.
(mod p),
V¯p ≡ (R | p)
(mod p).
By using (2.10), (2.12), (2.11), and (2.13), with .m = p and .n = 1, and the above congruences, he deduced that ¯p− σ (R, Q) p|U
.
and
V¯p− σ (R, Q) ≡ 2σQ(1− σ)/2
(mod p),
4.5 The Primitive Divisor Theorem
93
where . = p := (D | p) and .σ = σp := (R | p). It follows that .ω(p) | ¯n (R, Q) p − σ. From these results, we can produce a law of appearance for .U ¯ whenever .p RQ, and if .p | R, .p Q, we get .p | U2p (R, Q). Lehmer also proved a result similar to Theorem 2.10.1. Theorem 63 Define .τ = τp := (Q | p). If p is an odd prime and .p DQR, then .p | V¯(p−σ )/2 if and only if .σ = −τ . With these findings, he was able to prove Theorem 50 (the Lucas-Lehmer test) by putting .R = 2 and .Q = −1. (See Theorem 8.4.9 in [39].) We can also derive results concerning the .V¯ = V¯ (R, Q) sequence which are analogous to those proved for the V sequence in Chap. 2; for example, ¯n , Q) = 1, .gcd(U ¯n , V¯n ) = 1 or 2, and .V¯n | V¯nm whenever m is positive .gcd(V and odd. Indeed, by using the same kind of reasoning as that employed in Sect. 2.7, we can show further that if p is some odd prime such that .p Q and ¯n , then .χ .(= χ(p)) (if it exists) is the least positive value of n such that .p | V ¯ .ω(p) must be even and .χ = ω/2. Also, if .p RQ and .p | Vm , then .χ | m and .m/χ is odd. Thus, if .p DQR and .χ(p) exists, then .χ(p) must be a divisor of .(p − σ)/2. For any odd prime p such that .p Q and any positive integer k, we define k k−1 .W (p ) = p (p − (RD | p)). For any .n ≥ 1 and .gcd(n, Q) = 1, Lehmer defined his generalization .T (n) of Euler’s totient function as .T (n) = 2 W (pk ), where the product is taken over all .pk such that .pk || n. By the laws of appearance and repetition for the Lehmer sequences, we have ¯T (n) ≡ 0 (mod n), U
.
for any positive integer n such that .gcd(n, Q) = 1. Lehmer also defined .S(n) to be the least common multiple of the factors 2 and .W (pk ) of .T (n) and ¯S(n) ; therefore, .ω(n) | S(n) for any positive integer n such noted that .n | U that .gcd(n, Q) = 1. Thus, by using the methods of Sect. 4.3, we can prove a ¯. result completely analogous to Theorem 61 for the Lehmer sequence .U
4.5 The Primitive Divisor Theorem Let .X = (Xn )n≥0 be any integer sequence. If p is a prime such that .p | Xn but .p Xm for any .m < n, we say that p is a primitive divisor of .Xn . As an example, consider the Fibonacci sequence, where we get .Fn = 55 when .n = 10. Since the aliquot divisors of 10 are 1, 2, and 5 and .F1 = F2 = 1 and .F5 = 5, we see that 11 must be a primitive divisor of .F10 . Indeed, if U is a Lucas sequence and .n > 1, we see that p is a primitive divisor of .Un
94
4 Further Properties
if and only if .ρ(p) = n. Notice that it is not always the case that any .Un with .n > 1 will have a primitive divisor. For example, consider .F12 = 144; there are only two primes 2 and 3 which divide this number and .ρ(2) = 3 and .ρ(3) = 4 for the Fibonacci sequence. For a given U , it is of some interest to determine those values of n such that .Un contains a primitive divisor. For a general Lucas sequence, this turns out to be a very deep and difficult problem which has only recently been solved. However, in the case of .D > 0, the problem was solved by Carmichael [7] in 1913. Yabuta [41] has provided an elementary and relatively simple proof of Carmichael’s result, which we will sketch below. We will assume in what follows that U is regular. Since we are dealing with primes that divide some term .Un with .n > 0, we may also assume that .p Q. We first observe that by using (2.1), it is easy to establish by induction on n that Un (−P, Q) = (−1)n−1 Un (P, Q),
.
Vn (−P, Q) = (−1)n Vn (P, Q)
(4.29)
for .n ≥ 0. Thus, whatever the sign of D, we may always assume that .P > 0. By (4.28), it is easy to see that p is a primitive divisor of .Un if and only if p is a primitive divisor of .Qn . We now prove some preliminary lemmas. Lemma 24 Let p be a prime such that p divides .Un with .n > 0. If .p | Qn , then .n = ρ(p)pk , where k is a nonnegative integer and .ρ(p) > 0 is the rank of appearance of p in U . Proof Since .p | Un , by Theorem 8, we have .n = rρ(p)pk , where .p r and k ν .k ≥ 0. Put .m = ρ(p)p and let .p || Um . Since .ρ(p) | m, we must have .ν ≥ 1; by Corollary 11 and results in Sect. 2.5, we see that .4p Un /Um . From (4.28), we also see that .Qn | Un /Um when .r > 1, but since .p|Qn , this is impossible. It follows that we can only have .r = 1 and .n = ρ(p)pk . . Lemma 25 Let .ρ(p) > 0 be the rank of appearance of p in U . For any positive exponent r, we have .p || Qn , where .n = ρ(p)pr , except when .p = 2, .ρ(2) = 3, and .r = 1. Proof For any fixed .r ≥ 1, put .m = ρ(p)pr−1 , and let .ρ(p) = ps t, where .p t and .s ≥ 0. We have .pm = pr+s tρ(p). From (4.28), we get .Upm /Um = Qdu , d|t
where .u = pr+s . If .p = 2, by Corollary 11, we have .p || Upm /Um ; thus, .p || Qju for some j such that .j | t. By Lemma 24, we have .ρ(p) | ju, and therefore r .t | jp , which since .p t means that .t | j and, since .j | t, we get .t = j. It follows that if .n = ju, then .n = tu = ρ(p)pr and .p || Qn . If .p = 2, we can prove the lemma and the exception by using results derived in Sect. 2.5. . Let .sqf (n), sometimes called the square-free kernel of n, be the product of all the distinct primes which divide n. For example, .sqf (360) = 2 · 3 · 5 = 30. We are now able to prove the following lemma.
4.5 The Primitive Divisor Theorem
95
Lemma 26 If .n = 1, 2, or 6, a sufficient condition that .Un contains at least one primitive divisor is that .|Qn | > sqf (n). Proof We prove the contrapositive. If .Un contains no primitive divisors, then Qn contains no primitive divisors. Thus, if any prime p divides .Qn , then p must divide some .Qm for some minimal m such that .0 < m < n. It follows that by Lemma 24, we have .m = ρ(p)pk for some .k ≥ 0 and .n = ρ(p)pr for some .r ≥ 0. Since .n > m, we must have .r ≥ k + 1 ≥ 1. Thus, .p | n, and by Lemma 25, we see that .p2 Qn . Hence, .Qn divides .sqf (n) and therefore .|Qn | ≤ sqf (n). . .
We now need to determine when the condition of .|Qn | > sqf (n) holds. We will assume that .n > 2 is fixed in what follows. We observe that if .ζ is a primitive nth root of unity, then (α − ζ k β)(α − ζ −k β) = α2 + β 2 − αβ(ζ k + ζ −k ) = P 2 − Qθk
.
where .θk = 2 + ζ k + ζ −k = 2 + 2 cos(2πk/n). Notice that if .gcd(n, k) = 1, then .0 < θk < 4. From (4.26) and the remarks following (4.28), we see that .Qn = (P 2 − Qθk ), (4.30) where the product is taken over all integers k such that .0 < k < n/2 and gcd(n, k) = 1.
.
Lemma 27 If .D > 0, then .Qn attains its least value when .P = 1 and .Q = −1 or when .P = 3 and .Q = 2. Proof Consider any fixed .θk in (4.30). If .Q < 0, then since we may assume P ≥ 1, we get .P 2 − Qθk ≥ 1 + θk with equality only when .P = 1 and .Q = −1. If .Q > 0, then clearly .Q = 1 or .Q > 1. In the first case, because .D > 0, we must have .P ≥ 3 and .P 2 − Qθk ≥ 0 − θk > 9 − 2θk > 0. In the second case, we get
.
P 2 − Qθk ≥ 4Q + 1 − Qθk = 9 − 2θk + (Q − 2)(4 − θk ) ≥ 9 − 2θk
.
with equality holding only when .Q = 2 and .P = 3. The lemma now follows from (4.30). Thus, when .D > 0, we need only check that .Qn > sqf (n) when . U is either the Fibonacci sequence or the Mersenne sequence. In order to deal with these two possibilities, we make use of the lemma below: Lemma 28 If .n > 2 and a is any real number such that .|a| < 1/2, then Φn (a) ≥ 1 − |a| − |a|2 .
.
Proof Since for any real x such that .|x| < 1, we have .1 − x ≥ 1 − |x| and (1−x)−1 ≥ 1−|x|, it is clear that .(1−an/d )μ(d) ≥ 1−|a|n/d . By (4.25), we get
.
96
4 Further Properties
Φn (a) ≥ (1 − |a|i ), where the product is taken over all positive integers i. Since for real x and y such that .0 < x, y < 1, we have .(1−x)(1−y) ≥ 1−x−y, we find that
.
Φn (a) ≥ (1−|a|)(1−|a|2 −|a|3 −|a|4 −· · · ) = (1−|a|)(1−
.
|a|2 ) = 1−|a|−|a|2 . 1 − |a|
We next deal with the Fibonacci case in the following lemma. Lemma 29 If .n = 1, 2, 6, or 12, then for the Fibonacci sequence, we have Qn > sqf (n). √ √ Proof In this √ case, we put .α = (1 + 5)/2 > 3/2, .β = (1 − 5)/2, and .|β/α| = (3 − 5)/2 < √ 1/2. By the previous lemma, we get .Φn (β/α) ≥ 1 − |β/α| − |β/α|2 = 2 5 − 4 > 2/5, and since .Qn = Qn (α, β) = Qn (β, α) = αϕ(n) Φn (β/α) by (4.27), we find that .Qn > (2/5)(3/2)ϕ(n) . Thus, if
.
(2/5)(3/2)ϕ(n) > sqf (n),
.
(4.31)
we are done. Let .sqf (n) = q1 q2 · · · qt , where the .qi (.i = 1, 2, . . . , t) are distinct primes. Suppose .q1ν || n and put .r = ϕ(q1ν ) and .m = n/q1ν ; we note that .ϕ(n) = rϕ(m). We will now show that if (2/5)(3/2)r > 2q1 ,
.
(4.32)
then (4.31) holds. This is certainly the case for .m = 1 or .m = 2. Thus, we may now assume that .m ≥ 3; in this case, we have .ϕ(m) ≥ 2. We next observe that .2/5 > (2/5)ϕ(m) and that ϕ(n) r ϕ(m) 2 3 2 3 . > > (2q1 )ϕ(m) ≥ q12 2ϕ(m) ≥ q1 2ϕ(u)+1 , 5 2 5 2
(4.33)
where .u = sqf (n)/q1 . If u is odd, then by Euler’s theorem, we have .2ϕ(u) ≡ 1 (mod u); consequently, .2ϕ(u) > u. If u is even, then .u/2 is odd, and .2ϕ(u) = 2ϕ(u/2) ≡ 1 (mod u/2); hence, .2ϕ(u)+1 > u. Since .u = sqf (n)/q1 , we can deduce (4.31) from (4.33). Now, if k is any integer greater than 10, it is easy to show by induction that .(2/5)(3/2)k−1 > 2k; thus, if .q1 is larger than 7, then (4.32) is true, and therefore, (4.31) holds. Also, if .q1ν = 24 , 33 , 52 , 72 , then (4.32) is true. Hence, (4.31) holds for higher powers of these primes. It remains, then, to consider only the cases of .n = 2a 3b 5c 7d , where .0 ≤ a ≤ 3, .0 ≤ b ≤ 2, .0 ≤ c ≤ 1, and .0 ≤ d ≤ 1. By substituting these values of n into the left-hand side of (4.31), we find that the inequality (4.31) is true except for .n = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 18, 30. By direct computation of .Qn for each of these exceptional subscripts, we find that .Qn > sqf (n) for .n = 1, 2, 3, 5, 6, 12. Since .F3 (.= 2) and .F5 (.= 5) each have a primitive divisor, we have our . result.
4.5 The Primitive Divisor Theorem
97
The following result can be proved for the Mersenne sequence. Lemma 30 If .n = 1, 2, 6, then the nth term of the Mersenne sequence contains at least one primitive divisor. Proof In this case, we have .α = 2 and .β = 1 and, by Lemma 28, Φn (β/α) ≥ 1/4. It follows that .Qn > (1/4)2ϕ(n) > (2/5)(3/2)ϕ(n) , with the latter inequality holding for .n > 2. The remainder of the proof follows by using reasoning similar to that employed in the proof of Lemma 29. .
.
We are finally able to prove Carmichael’s theorem. Theorem 64 (Carmichael [7]) If .D > 0 and .n = 1, 2, 6, then .Un contains at least one primitive divisor except for .P = 1, .Q = −1, and .n = 12. Proof By Lemma 27, we know that the least value of .Qn can only occur when .Un = Fn or .Mn . By Lemmas 29 and 30, we know that in these cases, we have .Qn > sqf (n) when .n = 1, 2, 3, 5, 6, 12. Thus, by Lemma 26, we see that .Un contains at least one primitive divisor when .n = 1, 2, 3, 5, 6, 12. We compute .Q5 = 5 for .Fn and .Q5 = 31 for .Mn ; hence, by Lemma 27, we have .Q5 > 5 when .Un = Fn . Also, if .Un = Fn , then 5 is a primitive divisor of .F5 = 5. Since .D > 0, we have .Q < P 2 /4 and .Q3 = P 2 − Q > 3P 2 /4 > 3 when .P > 1. If .P = 1 and .Q < −2, we get .Q3 > 3, and if .P = 1 and .Q = −2, we get .Q3 = 3; in both cases, 3 is a primitive divisor of .Un . If .P = 1 and .Q = −1, we have the Fibonacci case, and 2 is a primitive divisor of .F3 . There remains the case of .n = 12. Since .Q12 = 13 for the Mersenne numbers and .Q12 = 6 for the Fibonacci numbers, we have .Q12 > 6 when .Un = Fn . We . have already seen that .F12 does not contain a primitive divisor. In 1955, Ward [35] showed that a similar result holds for the Lehmer ¯. sequences .U Theorem 65 If .D > 0 and .n = 1, 2, 6, then .Un contains at least one primitive divisor except for .R = 1, .Q = −1, and .n = 12 or .R = 5, .Q = 1, and .n = 12. Proof This can be shown by using reasoning similar to the above. An important observation is that if .n = 1, 2, 6 and the cyclotomic number associated ¯n (R, Q) for both .R = 1 and .Q = −1 and .R = 5 and .Q = 1 is greater with .U ¯n contain at least one primitive than .sqf (n), then all Lehmer sequences .U divisor. . ¯n which As mentioned earlier, it is very difficult to find all the .Un and .U have primitive divisors in the case of .D < 0. This problem was only completely solved relatively recently by Bilu et al. [2], where is it shown that for .n > 30, any Lucas or Lehmer number must have a primitive divisor. This ¯n , which do not have a primitive allowed the authors to present all .Un and .U divisor. While [2] is the work of three authors, it must be emphasized that it
98
4 Further Properties
represents the culmination of many years of previous work by several investigators. As this material would take us well beyond the scope of this work, the interested reader should consult [2] for further information. This paper is very clearly written and contains an extensive bibliography.
4.6 Moduli for Which U Contains a Full Set of Residues As in Sect. 4.1, let .(Xn ) denote any second-order linear recurrence with characteristic polynomial .x2 − P x + Q, where P and Q are integers such that .gcd(P, Q) = 1. Following Shah [28], we will say that a given positive integer m is defective with respect to .(Xn ) if a complete set of residues modulo m does not exist in .(Xn ); otherwise, we say that m is nondefective with respect to .(Xn ). For example, consider the Fibonacci sequence .(Fn ), where .Fn = Un (1, −1). If we take this sequence modulo 5, we get .0, 1, 1, 2, 3, 0, 3, 3, 1, 4, . . . ; thus, 5 is nondefective in .(Fn ) because a complete set of residues .{0, 1, 2, 3, 4} modulo 5 occurs in .(Fn ). Indeed, we have the more general result below. Theorem 66 Let p be any prime such that .p | D, where .D = P 2 − 4Q. If .Un = Un (P, Q), then p is nondefective with respect to .(Un ). Proof If .p = 2, then because .U0 = 0 and .U1 = 1, we see that p is nondefective with respect to .(Un ); thus, we may now assume that p is odd. By (2.28), we have .Um ≡ m(P/2)m−1 (mod p) for all .m ≥ 0. Also, since .p | D and .gcd(P, Q) = 1, we see that .p P . If we let k be any integer such that 2 .0 ≤ k ≤ p − 1 and put .m = p − kp + k, then .p − 1 | m − 1, and for this value of m, we have .Um ≡ k (mod p). It follows that .(Un ) must contain a complete set of residues modulo p.
.
On the other hand, if we take .(Fn ) modulo 8, we get the repeating sequence 0, 1, 1, 2, 3, 5, 0, 5, 5, 2, 7, 1, . . . Since the residue .6 (mod 8) does not occur in this sequence, we see that 8 is defective in .(Fn ). With regard to the Fibonacci sequence .(Fn ), Burr [5] proved the theorem below.
.
Theorem 67 The integer m is nondefective with respect to .(Fn ) if and only if .m = 5k , .2 · 5k , .4 · 5k , .3j · 5k , .6 · 5k , .7 · 5k , or .14 · 5k , where .k ≥ 0 and .j ≥ 1. The purpose of this section is to investigate the question of when a given m can be nondefective in .(Xn ). The following simple result is essentially due to Shah. Theorem 68 If m is defective with respect to .(Xn ), then every positive multiple of m is also defective with respect to .(Xn ).
4.6 Moduli with a Full Set of Residues
99
Proof Suppose tm is not defective with respect to .(Xn ); then for every r where .0 ≤ r ≤ m − 1, there exists some .Xn such that .Xn ≡ r (mod tm). Since .Xn ≡ r (mod m), we see that m is not defective, a contradiction. . In what follows, we will assume that .gcd(Q, m) = 1; this, of course, is automatic when .|Q| = 1. We have a somewhat surprising result mentioned in Somer and Kˇr´ıˇzek [33]. Theorem 69 If m is nondefective with respect to .(Xn ), then m is nondefective with respect to .(Un ). Proof By results in Sect. 4.1, we know that .(Xn ) is purely periodic modulo m; thus, we may assume with no loss of generality that .X0 ≡ 0 (mod m). Put .d = gcd(X1 , m), and note that since .d | X0 , we must have .d | Xn for all .n ≥ 0 by the recursion for .(Xn ). If .d > 1, then since .Xn ≡ 1 (mod m), we see that m is defective with respect to .(Xn ), a contradiction. Thus, .d = 1 and .X1 ≡ c (mod m), where .gcd(c, m) = 1. Once again, by the recursion for .(Xn ), we find that −1 .Un ≡ c Xn (mod m), for all .n > 0, where .c−1 c ≡ 1 (mod m). Thus, m is also nondefective with . respect to .(Un ). In view of Theorems 68 and 69, we see that it is important to examine the question of whether a prime p can be nondefective in .(Un ). Theorem 70 If p is any odd prime such that the Legendre symbol .(D | p) = 1, then p is defective with respect to .(Un ). Proof By Lemma 9 and Theorem 9, we have .Up ≡ 1 and .Up−1 ≡ 0 (mod p). It follows from the recurrence (2.1) that Up−1+n ≡ Un
.
(mod p)
(n ≥ 0).
Thus, the period length .τ of .(Un ) must be such that .τ ≤ p − 1. Since there can be at most .p − 1 (.< p) distinct elements in the periodic part of .(Un ) modulo p, we see that p must be defective with respect to .(Un ). . The situation when .(D | p) = −1 is more complicated. We know that in this case (Lemma 9 and Theorem 9), we have .Up ≡ −1, .Up+1 ≡ 0, and therefore .Up+2 ≡ Q (mod p). We also have the easily verified (by simply using the formula for .Un in (2.5)) Lucas sequence identities Un+m = Un+1 Um − QUn Um−1
.
Q Un−m = Un Um+1 − Un+1 Um m
(n ≥ 0, m ≥ 1), (n ≥ m ≥ 0).
Both of these identities are special cases of the more general Uk Un+m = Un Um+k − Qk Um Un−k ,
.
and
100
4 Further Properties
given as (4.2.14) in Williams [39]. Putting .n = p and .m = r + 1 in the first of these yields .Up+1+r ≡ QUr (mod p) (r ≥ 0) (4.34) and putting .n = p + 1, .m = r in the second yields Qr Up+1−r ≡ −QUr
.
(r ≥ 0).
(4.35)
(k ≥ 0, r ≥ 0),
(4.36)
(mod p)
By iterating (4.34), we get Uk(p+1)+r ≡ Qk Ur
.
(mod p)
and by using (4.36) together with (4.35), we find that Uk(p+1)−r ≡ −Qk−r Ur
.
(mod p)
(k ≥ 1, r ≥ 0).
(4.37)
From these two results, we see that for .r = 1, Uk(p+1)+1 ≡ Qk , U(k+1)(p+1)−r ≡ −Qk
.
(mod p)
(k ≥ 0).
(4.38)
Theorem 71 Suppose that p is an odd prime and .(D | p) = −1. If Q belongs to the exponent .p − 1 (mod p), then p is nondefective with respect to .(Un ); if Q belongs to the exponent .(p − 1)/2 (mod p) and .p ≡ −1 (mod 4), then p is also nondefective with respect to .(Un ). Proof If Q belongs to the exponent .p−1 modulo p, then Q is a primitive root modulo p. By the first result in (4.38) and .U0 = 0, we see that .(Un ) contains a complete set of residues modulo p. If Q belongs to the exponent .(p − 1)/2 (mod p) and .p ≡ −1 (mod 4), then no power of Q can be .−1 modulo p. Hence, by both results in (4.38), we see that .(Un ) must contain a complete . set of residues modulo p. Now suppose p is a prime such that .p = 2q + 1, where q is an odd prime. Such primes are called Sophie Germain primes, and it is widely believed by analytic number theorists (but not yet proved) that there exists an infinitude of such primes. Indeed, if .P (x) denotes the number of Sophie Germain primes .< x, then it follows by Hypothesis H of Bateman and Horn [1] that .P (x) ∼ 2Cx/(log x)2 , where .C = 0.6601618 · · · , and it has been shown that this estimate is quite accurate for x up to .1010 . (See Sect. 3.5 of Caldwell [6].) For such a prime p, we see that if .p Q and .|Q| = 1, then Q belongs to the exponent .p − 1 or .(p − 1)/2 (mod p). Also, by a result like Theorem 5.3.1 of [39], we know that for each value of Q, there exist precisely .(p − (Q | p))/2 values of P modulo p such that .((P 2 − 4Q) | p) = (D | p) = −1. Thus, by Theorem 4.4.6, there must exist many pairs .(P, Q) modulo p such that any Sophie Germain prime p is nondefective with respect to the corresponding .(Un ). As a consequence of this, it is very likely that if .|Q| > 1, then there
4.6 Moduli with a Full Set of Residues
101
exist infinitely many primes p such that p is nondefective in some .(Un ). This strongly suggests that the problem of determining all nondefective primes with respect to a given .(Un ) becomes extremely difficult to manage when .|Q| = 1. It is for this reason that we assume that .|Q| = 1 in the sequel. We now deal with the case of an odd prime p such that .(D | p) = −1 and .Q = 1. Theorem 72 If .p ≥ 5 is a prime such that .(D | p) = −1 and .Q = 1, then p is defective with respect to .(Un ). Proof By (4.34), we have .Up+1+n ≡ Un (mod p) (.n ≥ 0). Thus, .(Un ) is periodic modulo p with period length .p + 1. Put .r = (p + 1)/2, and observe from Theorem 36 that p divides .Ur . From (2.10) with .m = r, we get 2Un+r ≡ Un Vr
.
(mod p);
also, from (2.8), we have .Vr2 ≡ 4 (mod p). Thus, .Vr ≡ 2η (mod p) and Ur+n ≡ ηUn
.
(mod p),
(4.39)
where .η is either 1 or .−1 and fixed. We also see from (2.10) that 2Un = 2Un−r+r ≡ Un−r Vr ≡ 2ηUn−r
.
(mod p).
By (2.7), we have Un ≡ −ηUr−n
.
(mod p).
(4.40)
It follows from (4.39) and (4.40) that the only possible distinct terms in the period of .(Un ) (mod p) can be 0, ±U1 , ±U2 , . . . , ±Us ,
.
where .s = r/2. Since .2s + 1 ≤ r + 1 < p (.p > 3), we see that p must be . defective with respect to .(Un ). In the case of .(D | p) = −1 and .Q = −1, we have the following result. Theorem 73 If .p ≥ 11 is a prime such that .(D | p) = −1 and .Q = −1, then p is defective with respect to .(Un ). This result was partially demonstrated by Somer [31] and completely proved by Schinzel [27], using a different technique. Later, Li [13] established this result by extending Somer’s methods. Now that all the possible primes that are nondefective in .(Un ) can be easily identified, it is feasible to extend Theorem 67 to include all sequences .(Un ) with .|Q| = 1. This was done in exhaustive detail by Somer and Kˇr´ıˇzek [32]. As the results in [32] are quite lengthy and detailed, we refer the interested reader to that paper for further information and references.
102
4 Further Properties
References 1. P. Bateman and R. Horn, A heuristic asymptotic formula concerning the distribution of prime numbers, Math. Comp. 16 (1962), 363–367. 2. Y. Bilu, G. Hanrot and P. Voutier, The existence of primitive divisors of Lucas and Lehmer numbers, J. Reine Angew. Math. 539 (2001), 75–122. 3. G. Brandner, RSA, Dickson, LUC and Williams: a study on four polynomial-type public-key cryptosystems, Applicable Algebra in Engineering Communication and Computing 24 (2013), 17–36. 4. J. Brillhart, P. L. Montgomery, and R. D. Silverman, Tables of Fibonacci and Lucas factorizations, Math. Comp. 50 (1988), 251–260. 5. S. Burr, On moduli for which the Fibonacci sequence contains a complete system of residues, Fibonacci Quart. 9 (1971), 497–504. 6. C. Caldwell, An Amazing Prime Heuristic, https://arxiv.org/abs/2103. 04483 7. R. D. Carmichael, On the numerical factors of the arithmetic forms αn ± β n , Annals of Math. 15 (1913), 30–70. 8. Richard Crandall and Carl Pomerance, Prime Numbers: A Computational Perspective, Springer-Verlag, New York, 2001. 9. A. Granville and P. Pleasants, Aurifeuillian factorization, Math. Comp. 75 (2005), 497–508. 10. Dov Jarden, Recurring Sequences, 2nd ed., Riveon Lematematika, 1966. 11. L. Kocarev, J. Makraduli and P. Amato, Public-key encryption based on Chebyshev polynomials, Circuits, Systems and Signal Processing 24 (2005), 497–517. 12. D. H. Lehmer, An extended theory of Lucas’ functions, Annals of Math. 31 (1930), 419–448. 13. H.-C. Li, Complete and reduced systems of second-order recurrences modulo p, Fibonacci Quart. 38 (2000), 272–281. 14. R. Lidl and H. Niederreiter, Finite Fields, Adison-Wesley, Reading, MA, 1983. 15. R. Lidl, G. L. Mullen and G. Turnwald, Dickson Polynomials, Longman Scientific and Technical, NY, 1993. ´ Lucas, Th´eorie des fonctions num´eriques simplement p´eriodiques, 16. E. Amer. J. of Math. 1 (1878), 184–240, 289–321. ´ Lucas, Th´eor`eme d’arithm´etique, Atti della Reale Accademia delle 17. E. scienze di Torino 13 (1878), 271–278. ´ Lucas, Sur les formules de Cauchy et de Lejeune-Dirichlet, Assoc. 18. E. Fran¸caise pour l’Avancement des Sciences, Comptes Rendus 7 (1878), 164–173. 19. J. C. Mason and D. C. Handscomb, Chebyshev Polynomials, Chapman&Hall/CRC, Boca Raton, FL, 2003. 20. R. McIntosh and M. Dipra, Carmichael numbers with p + 1 | n + 1, J. of Number Theory 147 (2015), 81–91.
References
103
21. G. Mullen and D. Panario, Handbook of Finite Fields, CRC Press, Boca Raton FL, 2013. 22. W. B. M¨ uller and W. N¨ obauer, Some remarks on public-key cryptosystems, Studia Sci. Math. Hungar. 16 (1981), 71–76. 23. R. Pinch, Absolute quadratic pseudoprimes, Proc. Conf. Algorithmic Number Theory 2007, Turku Centre for Computer Science General Publication 46 2007, 113–128. 24. R. Pinch, The Carmichael numbers up to 1021 , Proc. Conf. Algorithmic Number Theory 2007, Turku Centre for Computer Science General Publication 46 (2007), 129–131. 25. Hans Riesel, Prime Numbers and Computer Methods for Factorization, 2nd Edition, Birkh¨ auser, Boston, 1994. 26. E. Roettger and H. Williams, Generalized Jarden’s Theorem, J. Integer Seq. 25 (2022), Art. 22.7.2. 27. A. Schinzel, Special Lucas sequences, including the Fibonacci sequence, modulo a prime, A Tribute to Paul Erd˝ os, Cambridge Univ. Press, Cambridge, 1990, 349–357. 28. A. Shah, Fibonacci sequence modulo m, Fibonacci Quart. 6 (1968), 139– 141. 29. A. Shallue and J. Webster, Fast tabulation of challenge pseudoprimes, 13th Algorithmic Number Theory Symposium, 411–423, Springer, NY, 2019. 30. Harold Shapiro, Introduction to the Theory of Numbers, WileyInterscience, NY, 1983. 31. L. Somer, Primes having incomplete residue systems for a class of second order recurrences, Applications of Fibonacci Numbers, Vol.2, Kluwer Academic Publ, Dordrecht, 1988, 113–141. 32. L. Somer and M. Kˇr´ıˇzek, On moduli for which certain second-order linear recurrences contain a complete system of residues modulo m, Fibonacci Quart. 55 (2017), no. 3, 209–228. 33. L. Somer and M. Kˇr´ıˇzek, Nondefective integers with respect to certain Lucas sequences of the second kind, Integers, 18 (2018),#A35. 34. S. S. Wagstaff, Jr., The Joy of Factoring, Volume 68 Student Mathematical Library, American Mathematical Society, Providence, RI, 2013. 35. M. Ward, The intrinsic divisors of Lehmer numbers, Annals of Math. 62 (1955), 230–236. 36. J. Webster and A. Gurovski, private communication, 2016. 37. S. Weintraub, Several proofs of the irreducibility of the cyclotomic polynomials, American Mathematical Monthly 120 (2013), 537–545. 38. H. C. Williams, On numbers analogous to Carmichael numbers, Canad. Math. Bull. 28 (1977), 133–143. ´ 39. H. C. Williams, Edouard Lucas and Primality Testing, Canadian Math. Soc. Series of Monographs and Advanced Texts, John Wiley and Sons, NY, 1998.
104
4 Further Properties
40. R. Witula and D. Slota, On modified Chebyshev polynomials, J. Math. Anal. Appl. 324 (2006), 321–343. 41. M. Yabuta, A simple proof of Carmichael’s theorem on primitive divisors, Fibonacci Quart. 39 (2001), 439–443.
Chapter 5
Some Properties of Lucasnomials
Quand on sait dire, on peut tout faire.
(Marcel Proust)
Lorsque les connaissances sont un amas d’erreurs et de v´ erit´ es, indistinctement ees ; lorsqu’une longue ignorance et beaucoup de si` ecles leur ont laiss´ e jeter des mˆ el´ racines profondes, la s´ eparation en est difficile. L’anciennet´ e ne prouve rien. Le respect, la croyance de plusieurs a ˆges ne sont que des pr´ ejug´ es. (Sophie Germain)
Abstract Lucasnomials, or Lucasnomial coefficients, are a generalization of n , when n and k are integers. Lucasnomials . the usual binomial coefficients k n . are associated with every nondegenerate fundamental Lucas sequence k U U . Their definition includes ordinary binomial coefficients which we get when .U = U (2, 1), i.e., if U is the sequence of natural numbers. Remarkably, various arithmetic properties of binomial coefficients hold in a more general form in this context.
5.1 Definition. Connection with q-Binomial Coefficients Definition 5 (Lucasnomials) Suppose U = U (P, Q) is a nondegenerate fundamental Lucas sequence. Assume nand k are integers. We define the Lucasnomial, or Lucasnomial coefficient nk U , as follows. ⎧ Un Un−1 ··· U n−k+1 ⎪ ⎨ Uk Uk−1 ··· U1 , n . = 1, k U ⎪ ⎩ 0,
if k ≥ 1; if k = 0; if k < 0.
(5.1)
As we will see in the next section, Lucasnomials are always integers if n ≥ 0. Lucasnomials are called Fibonomials if U is the Fibonacci sequence, that is, if U = U (1, −1). A number of properties of general Lucasnomials were first hinted at through studies of Fibonomials. © Springer Nature Switzerland AG 2023
C. J.-C. Ballot, H. C. Williams, The Lucas Sequences, CMS/CAIMS Books in Mathematics 8, https://doi.org/10.1007/978-3-031-37238-4 5
105
106
5 Some Properties of Lucasnomials
We point out here the close connection between q-binomial coefficients or Gaussian coefficients, introduced by Gauss, and Lucasnomials. Formally, Gaussian coefficients nk q are defined by replacing any term Ui , i ≥ 0, in Equation (5.1) by the q-number i := 1 + q + q 2 + · · · + q i−1 =
. q
qi − 1 = Ui (q + 1, q). q−1
(5.2)
The q-binomial coefficients are defined as rational functions in the variable q, which actually turn out to be polynomials in Z[q]. If we assign and fix an integer value for q, with |q| ≥ 2, then, by Definition 5, they become Lucasnomials with respect to the sequence U (q + 1, q). Gaussian coefficients turn up in various mathematical areas and have also been the object of study of many articles. Their properties also generalize properties of binomial coefficients. By letting the variable q tend to 1 in an identity involving Gaussian coefficients, we often either recover or discover an identity satisfied by binomial coefficients. But it is also possible to obtain a Lucasnomial identity from an identity for q-binomial coefficients directly, and vice versa. The upshot is that there are two main roads to the study of Lucasnomials. One uses Lucas sequences and their arithmetic properties, or particular Lucas sequences such as the Fibonacci sequence, while the other main source comes from q-calculus. To convert a q-identity into a Lucasnomial identity, where U = U (P, Q), α and β are the zeros of x2 − P x + Q, or vice versa, one may use the transformation formulas α = Qβ −2 , .q = (5.3) β and Un =
.
qn − 1 αn − β n , = β n−1 q−1 α−β
and, therefore, k n ((n−i)−(i−1)) n k(n−k) n i=1 . =β =β . k U k q k q Example 74 Consider for n ≥ k ≥ 0 the q-identity n−1 n k n−1 . =q + , k−1 q k q k q
(5.4)
(5.5)
(5.6)
which has elegant combinatorial proofs, but is easy to check algebraically. Using (5.3) and (5.5), we see that n−1 n−1 −k(n−k) n .β = Qk β −2k β −k(n−1−k) + β −(k−1)(n−k) . k U k k−1 U U
5.2 Integrality
107
Multiplying by β k(n−k) and using Q = αβ, we obtain the Lucasnomial identity n n−1 n−1 . = αk + β n−k . (5.7) k U k k−1 U U Occasionally, it may also be worth viewing Lucasnomials as polynomials in Z[P, Q], a result we will establish in the next section.
5.2 Integrality Lucas [56, p. 203] stated that the product of any n consecutive terms of a sequence U is divisible by its first n terms, with a near-complete justification. If, say, binomial coefficients are introduced via their factorial formula, then one may prove their integrality using the Pascal identity (5.19) and an induction argument. This is, in fact, how Lucas justifies his statement [56, p. 203] after giving a simple proof of the generalized Pascal identity (5.20). Many proofs of the integrality of Lucasnomials in the more recent literature actually follow this path. Ward [79] proved that generalized binomial coefficients (see Definition 6) with respect to a strong divisible† sequence .X = (xn )n≥0 are integers. Hence, his result implies the integrality of Lucasnomials when .gcd(P, Q) = 1. Combinatorial interpretations of Lucasnomials are, among other means, yet other proofs of their integrality. We will mention these in Sect. 5.4. By viewing Lucasnomials as rational functions in P and Q, we will prove them to be polynomials in .Z[P, Q] using a remark made in the proof of [71, Prop. 2]. That they are integers immediately follows. Note that, by (2.31), for a pair of integers P and Q, .Un (P, Q) is the value of the polynomial .Ψn (P, Q) in .Z[P, Q] for all .n ≥ 0. By (2.32) or (2.34), we also see that .Vn (P, Q) is a polynomial in .Z[P, Q]. Definition 6 (Generalized binomial coefficients) Suppose .X = (xn )n≥0 or .(xn )n∈Z is a sequence of complex numbers, polynomials, or functions with .x0 = 0 and .xn = 0 .(n > 0). We define the generalized binomial coefficient with respect to X for all .n ≥ 0 or all .n ∈ Z, as the case may be, as follows: ⎧ xn xn−1 ··· x n−k+1 ⎪ ⎨ xk xk−1 ··· x1 , if k ≥ 1; n (5.8) . = 1, if k = 0; k X ⎪ ⎩ 0, if k < 0. Remark 24 Lucas did not formally define Lucasnomials. An abstract general definition, such as Definition 6, appears in a 1915 one-page note of Fonten´e [28]. However, Ward’s 1936 paper [80] might have been the first paper to †
That is, a strong divisibility sequence as is more traditional to say.
108
5 Some Properties of Lucasnomials
develop properties of generalized binomial coefficients with respect to an abstract sequence of complex numbers .X = (xn )n≥0 satisfying .x0 = 0, .x1 = 1, and .xn = 0 for .n ≥ 2. He uses the pretty terminology “binomial coefficient to the base X.” Lemma 31 Suppose .X = (xn )n≥0 or .(xn )n∈Z is a sequence of nonzero complex numbers or functions except that .x0 = 0. If .k ≥ 1 and n are integers and .rxn = sxn−k + txk , (5.9) where r, s, and t are variables, or complex numbers or functions, then n n−1 n−1 .r =s +t . (5.10) k X k k−1 X X Proof Indeed, n xn n − 1 .r =r k X xk k − 1 X sxn−k + txk n − 1 = k−1 X xk n−1 xn−k n − 1 +t =s k−1 X k−1 X xk n−1 n−1 =s +t . k k−1 X X Definition 7 If n and k are integers, .n ≥ 0, then the Lucaspolynomial . nk Ψ is the generalized binomial coefficient with respect to the sequence of polynomials .(Ψn )n≥0 defined in (2.31). We need a small lemma to convert some Lucas identities into polynomial identities. Lemma 32 If two complex-coefficient polynomials in two variables .f (P, Q) and .g(P, Q) are equal for all nonzero integer values of P and Q, then .f = g. Proof We may fix the variable Q and obtain two polynomials .fQ and .gQ in P which, being equal for infinitely many values of P , must be identical. The coefficients of .fQ and .gQ are polynomials in Q which are equal for infinitely many values of Q. Hence, these polynomial coefficients are identical on both . sides. Thus, .f = g as polynomials in P and Q. For an example, the identity (2.42) Um = Un+1 Um−n − QUm−n−1 Un ,
.
5.2 Integrality
109
valid for all Lucas sequences U , holds for all nonzero values of P and Q. Both sides of the equation can be viewed as polynomials in P and Q. Therefore, by Lemma 32, we see that Ψm = Ψn+1 Ψm−n − QΨm−n−1 Ψn .
.
(5.11)
Theorem 75 Suppose .n ≥ k ≥ 1 are integers. Then the Lucaspolynomial n is a polynomial in P and Q with integer coefficients. k Ψ
.
Proof We saw just in (5.11) that Ψn = Ψk+1 Ψn−k − QΨn−k−1 Ψk .
.
By Lemma 31 with .r = 1, .s = Ψk+1 , and .t = −QΨn−k−1 , we obtain the identity n n−1 n−1 . = Ψk+1 − QΨn−k−1 . (5.12) k Ψ k k−1 Ψ Ψ That . nk Ψ is in .Z[P, Q] follows by the verification of the initial values and . induction on n. Corollary 76 If .U (P, Q) is a nondegenerate fundamental Lucas sequence . and .n ≥ 0 and k are integers, then . nk U is an integer. Proof Note that the nondegeneracy of U makes Lucasnomials well defined. If .k < 0, then . nk U = 0. If .k = 0, then . nk U = 1. So we may assume .k ≥ 1. If .0 ≤ n < k, then, since .U0 = 0, . nk U = 0. Assume .n ≥ k ≥ 1. Theorem 75 n implies that . k U is an integer. . We now state a useful corollary to Lemma 31. Corollary 77 Suppose .X = (xn )n∈Z is a sequence of complex numbers or functions with .xn = 0 if and only if .n = 0. Assume for all n and k rxn = sxn−k + txk ,
.
where r, s, and t are functions of n and k such that .r = s if .n = k = 0. Then Equation (5.10), i.e., n n−1 n−1 .r =s +t , k X k k−1 X X holds for all integers n and k.
.
Proof This follows from Lemma 31 for all integers n if .k ≥ 1. If .k < 0, then both sides of (5.10) are null. If .k = 0, then (5.10) holds if and only if .r = s. By hypothesis, .rxn = sxn + tx0 = sxn . If .n = 0, then .xn = 0 and so .r = s. If .k = 0 and .n = 0, then .r = s by hypothesis. Thus, (5.10) holds in all cases. .
110
5 Some Properties of Lucasnomials
Corollary 78 Suppose .U (P, Q) is a nondegenerate fundamental Lucas sequence and n and k are integers. Then n n−1 n−1 . = Uk+1 − QUn−k−1 . (5.13) k U k k−1 U U Proof The corollary follows from the polynomial identity (5.12) for .n ≥ k ≥ 1. But applying Corollary 77 to the Lucas identity .Un = Uk+1 Un−k − QUn−k−1 Uk with .X = U , .r = 1, .s = Uk+1 , and .t = −QUn−k−1 yields the . full result. Unfortunately, identity (5.13) m−1 m−1 is not a direct generalization of the addition + n−1 of binomial coefficients. Such generalizations property . m n = n exist. Indeed, identity (5.7) is one of them. But we will present some others in the next subsection.
5.3 Ten Basic Identities In [33, p. 174], ten basic essential properties of binomial coefficients . kr , r complex, k integral, are listed. We borrow the names of these properties from the book [33] and present their extension to Lucasnomials. Since we did not attempt to generalize Lucasnomials for r complex or real, we take r to be an integer n. We assume U to be a nondegenerate fundamental Lucas sequence. Putting .P = 2 and .Q = 1 yields the corresponding binomial identity since for all integers n, .Un (2, 1) = n. Note that .Vn (2, 1) = 2 for all n. 1. Factorial expansion. For .1 ≤ k ≤ n integers, the formula n Un Un−1 · · · U1 . = k U (Uk · · · U1 )(Un−k · · · U1 )
(5.14)
is obtained by multiplying numerator and denominator in Definition 5 by Un−k · · · U1 .
.
2. Symmetry. For all integers .n ≥ 0, we find that n n . = . n−k U k U
(5.15)
If .k < 0, then .n − k > 0 and .Un Un−1 · · · Un−(n−k)+1 = Un Un−1 · · · Uk+1 = 0 and both sides of (5.15) are zero. Both sides are 1 for .k = 0. The identity holds for .k ≥ 1 by (5.14) since .n − (n − k) = k. 3. Absorption. For k nonzero and from Definition 5, we find that n Un n − 1 . = . (5.16) k U Uk k − 1 U
5.3 Ten Basic Identities
111
4. Upper negation. The formula k(k−1) n k−n−1 k kn− 2 . = (−1) Q k k U U
(5.17)
holds for all integers n and k. Proof If .k = 0, then both sides of the formula are 1. If .k < 0, then both
k−1 and, by (2.7), sides are 0. Assume .k ≥ 1. Since . i=0 (n − i) = kn − k(k−1) 2 j .Q U−j = −Uj , we see that Qkn−
.
k(k−1) 2
k−n−1 k
(Qn−(k−1) Uk−n−1 )(Qn−(k−2) Uk−n−2 ) · · · (Qn U−n ) Uk · · · U1 U U · · · U n n−1 n−k+1 = (−1)k Uk · · · U1 k n = (−1) . k U =
U
5. Trinomial revision. The identity m m n m−k . = k U n−k U n U k U
(5.18)
holds for all integers m, n, and k.
Proof If .k < 0, then both sides are 0. Both sides are . m n U if .k = 0. So we assume .k ≥ 1. Again, both sides are equal if .n ≤ k, whether .n < 0, .0 ≤ n < k, or .n = k. Thus, now suppose .n > k ≥ 1. For all integers m, we may write m m−k Um Um−1 · · · Um−k+1 Um−k · · · Um−n+1 . = · k U n−k U Un−k · · · U1 Uk · · · U1 Un · · · Un−k+1 Um Um−1 · · · Um−n+1 · = (Uk · · · U1 )(Un−k · · · U1 ) Un · · · Un−k+1 Um Um−1 · · · Um−n+1 Un · · · Un−k+1 · = U ···U Uk · · · U1 n 1 m n = . n U k U Remark 25 As noted by Gould [34, p. 26], the identity (5.18) holds for any generalized binomial coefficients in the sense of Definition 6. 6. Addition/Induction. The identity n n−1 n−1 . = + , k k k−1
(5.19)
112
5 Some Properties of Lucasnomials
sometimes called, particularly in countries influenced by French culture, the Pascal identity, has the direct extension n Vk n − 1 Vn−k n − 1 . = + , (5.20) k U 2 k 2 k−1 U U which holds for all integers n and k. Proof If .k < 0, then both sides are 0. If .k = 0, then both sides are equal to 1 since .V0 = 2. Thus, we assume .k ≥ 1. Applying Lemma 31 with the Lucas identity (2.10), written in the shape .2Un = Vk Un−k + Vn−k Uk , where .r = 2, .s = Vk , and .t = Vn−k , we obtain Equation (5.20) after division by 2. . Remark 26 Another direct extension of Pascal’s identity was given in (5.7) since .α = β = 1 for .U (2, 1). Actually, identity (5.7) is valid if we interchange the roles of the zeros .α and .β. Thus, adding (5.7) to its conjugate identity n k n−1 n−k n − 1 . =β +α (5.21) k U k k−1 U U yields a second proof of (5.20). Note that we got (5.7) from the q-identity (5.6). However, we can derive (5.7) from Corollary 77 and the identity .Un = αk Un−k + β n−k Uk . The same holds true of the q-identity (5.6), since .q n − 1 = q k (q n−k −1)+q k −1 implies that .nq = q k (n−k)q +kq . Finally, we observe that, by Corollary 77, (5.7) is true for all integers n and k, not just for .n ≥ k ≥ 0. Remark 27 It is interesting to note that if one applies (5.20) to the Lu , where .k ≥ 1, multiply the equation that results by casnomial . k−n−1 k U k(k−1)
and perform upper negation on all three Lucasnomials, (−1)k Qkn− 2 then, after some simplification, one obtains n+1 n k n .2Q = Vk − Vn+1 . k U k k−1 U U
.
Up to an index shift, the preceding equation follows from applying Lemma 31 to identity (2.12), written in the form .Vk Un = 2Qk Un−k + Vn Uk . In fact, the identity (5.22) is as much a direct extension of the usual addition of binomial coefficients as the identity (5.20). Thus, we record it below. The equation n n−1 k n−1 .Vk = 2Q + Vn (5.22) k U k k−1 U U holds for all integers n and k. 7. Upper summation. The summation on the upper index i n + 1 . = k k+1 0≤i≤n
5.3 Ten Basic Identities
113
derives naturally from the Pascal identity. It was noted by Gould [34, eq. (13)] that for generic generalized binomial coefficients with respect to some .X = (xn )n≥0 , we have the general formula xi − xi−k i n+1 . = . k+1 X k X xk 0≤i≤n
Now since we have several Lucasnomial generalizations of the Pascal identity, we obtain several corresponding generalizations for the upper summation formula. One comes from identity (5.7): n+1 (n−i)(k+1) i−k i . α β = , (5.23) k+1 U k U 0≤i≤n
which holds for all nonnegative integers n and k. Proof Fix .k ≥ 0 to an arbitrary and perform value, an induction on .n ≥ 0. k+1 n+1 n+1−k n+1 as .α + β identity (5.7), Then express . n+2 k+1 U k+1 U k U using n+2 and we readily obtain, using the inductive hypothesis, that . k+1 U equals .
α
(n+1−i)(k+1) i−k
0≤i≤n+1
β
i . k U
Similar inductive proofs yield, for all nonnegative n and k, the generalizations n+1 i n−i . 2i−n−1 Vk+1 Vi−k = (5.24) k+1 U k U 0≤i≤n
and .
(2Q
k+1 n−i
)
i−k−1 Vk+1 Vi+1
0≤i≤n
i n−k n + 1 = Vk+1 , k U k+1 U
(5.25)
using, respectively, the generalized Pascal identities (5.20) and (5.22). 8. Parallel summation. Parallel summation n + i n + k + 1 . = i k i≤k
also derives naturally from the Pascal identity. Using one of the three generalizations (5.7), (5.20), or (5.22) of the addition/induction formula, we obtain three respective generalizations of parallel summation, which are n+k+1 i n+1 k−i n + i . α (β ) = , (5.26) k i U U i≤k
114
5 Some Properties of Lucasnomials
.
k−i 2−(k+1−i) Vi Vn+1
i≤k
n+i i
= U
n+k+1 , k U
(5.27)
and .
i≤k
2Qi (
i−1
Vj )(
j=0
k−1−i
Vn+k+1−j )
j=0
n+i i
=( U
k
Vi )
i=0
n+k+1 k
, (5.28) U
where as usual an empty product is equal to 1. The three identities (5.26), (5.27), and (5.28) hold for all integers n and k. Proof We provide a proof of, say, (5.27). Similar proofs for (5.26) and (5.28) are possible. We perform an induction on k. If .k < 0, then both sides of (5.27) are zero for all n. Thus, the induction is well based. Fix . ≥ −1, and assume (5.27) holds for .k = and all n. We verify that it holds for .k = + 1 using (5.20): n + ( + 1) + 1 . +1 U Vn+1 n + + 1 V+1 n + + 1 = + 2 +1 2 U U V+1 n + + 1 Vn+1 −i n + i −(+1−i) = + 2 Vi Vn+1 i 2 +1 2 U U i≤ V+1 n + + 1 (+1)−i n + i + 2−((+1)+1−i) Vi Vn+1 = i 2 +1 U U i≤ (+1)−i n + i = 2−((+1)+1−i) Vi Vn+1 , i U i≤+1
which terminates the inductive proof.
.
9. Binomial theorem. The binomial theorem given in the form n
(1 + x) =
.
n n k=0
k
xk ,
(n ≥ 0)
generalizes into the following Lucasnomial theorem: n−1 .
i=0
(x + αi β n−1−i ) =
n k=0
Q(
n−k 2
) n xk , k U
(n ≥ 0)
(5.29)
where .U (P, Q) is a nondegenerate fundamental Lucas sequence and .α and .β are the zeros of .x2 − P x + Q.
5.3 Ten Basic Identities
115
Proof We proceed by induction on n. Identity (5.29) holds for .n = 0 and n = 1. Assume it holds for some .n ≥ 0. If we multiply (5.29) through by .β n , distributing one .β for each factor on the LHS, and put .y = βx, we obtain writing x instead of y
.
n−1 .
i n−i
(x + α β
)=
i=0
n k=0
β
n−k
n−k n ) ( 2 Q xk . k U
Multiplying both sides of the above equation by .(x + αn ), the LHS is the n desired product . i=0 (x + αi β n−i ), while on the RHS, the coefficient .ck of .xk is n n n n−k (n−k n+1−k (n+1−k ) ) 2 2 .ck = α β Q +β Q k U k−1 U n−k n+1−k n n k n−k ( 2 ) n+1−k ( 2 ) =α ·Q Q +β Q k U k−1 U n+1−k n n = Q( 2 ) α k + β n+1−k k U k−1 U n+1−k n + 1 = Q( 2 ) , k U where the last line comes from (5.7). This completes the induction.
.
A formula equivalent to (5.29) but for q-binomial coefficients is proved in [42, Thm. 348] with techniques that date back to Euler. In fact, Ward [80] mentions the 1748 formula of Euler n n n−1 .(x + y)(x + qy) · · · (x + q y) = q r(r−1)/2 xn−r y r . r q r=0 Jarden and Motzkin [44, 45] proved that the product of .n − 1 (.n ≥ 1) secondorder recurring sequences, all with characteristic polynomial .x2 − P x + Q, is an nth-order linear recurring sequence annihilated by the polynomial f (x) :=
n
.
(−1)k
k=0
n Qk(k−1)/2 xn−k . k U
2 If .α and .β are the zeros of .x − P x + Q, then a product of the form
n−1 t t . k=1 (c1,k α + c2,k β ) is clearly annihilated by the polynomial n−1 .
(x − αi β n−1−i ).
i=0
The above polynomial and .f (x) have the same degree, and, in fact, we have the identity
116
5 Some Properties of Lucasnomials n .
n−1 n (−1) Qk(k−1)/2 xn−k = (x − αi β n−1−i ), k U i=0 k
k=0
which is equivalent to (5.29). (Compute .(−1)n f (−x) and change .n − k into k to find (5.29).) Also, the formula of Jarden, namely, n−1 .
i=0
(x − α β
i n−1−i
)=
n
k+1 n ) ( 2 (−1) xn−k , k F
k=0
appears in Carlitz’s work [22], but for the Fibonacci sequence, .F = U (1, −1). That is, .α and .β are the zeros of .x2 − x − 1. 10. Vandermonde convolution. The Lucasnomial identity m+n n m(k−i) in −i(k−i) m . = α β Q , (5.30) k i U k−i U U i where .α and .β are the zeros of .x2 − P x + Q and .U = U (P, Q), generalizes the classical Vandermonde convolution m+n m n . = . k i k−i i Identity (5.30) holds for all integers m, n, and k. We begin with proving (5.30) for m and n nonnegative integers and any integer k. Proof We carry out an induction on .m+n ≥ 0. If .m+n = 0, then .m = n = 0. Both sides are 0 unless .k = 0, in which case both sides are 1. Let us assume (5.30) holds for some .m + n ≥ 0 and all k. Then m + (n + 1) m+n m+n . = βk + αm+n+1−k k k k−1 U U U m n = βk αm(k−i) β in Q−i(k−i) + i k −i U U i m n αm(k−1−i) β in Q−i(k−1−i) αm+n+1−k i U k−1−i U i m = αm(k−i) β i(n+1) Q−i(k−i) × i U i n n k−i n+1−k+i β +α k−i U k−1−i U m n+1 = αm(k−i) β i(n+1) Q−i(k−i) , i U k−i U i where the first and last equalities come from Equation (5.21).
.
5.4 Combinatorial Interpretations
117
To prove (5.30) holds for all m, n, and k, it is convenient to use the equivalent q-Vandermonde convolution identity m+n n (m−i)(k−i) m . = q , (5.31) k i q k−i q q i which can be seen to be equivalent to (5.30) using Equations (5.3) and (5.5). Note that for .q = α/β = 1, we fall back on the usual Vandermonde convolution. If .k < 0, then both sides of (5.30) are zero. Thus, we assume .k ≥ 0. Say we fix .q > 1 real, .n ≥ 0 and .k ≥ 0 two integers, then we can view m (5.31) as an identity between two real polynomials in .X = q each of degree k. (For each .0 ≤ i ≤ k, . mi q is a degree-i polynomial in X, while
q (m−i)(k−i) = q −i(k−i) X k−i has degree .k − i.) As (5.31) holds for more than k values of X, i.e., for all .q m , .m ≥ 0, the two sides as polynomials in X must be equal. The coefficients of .X , .0 ≤ ≤ k, are polynomials in .Y := q n of degree at most k on both sides of (5.31). As they agree for all values of .Y = q n , .n ≥ 0, more than k values, these polynomials must be identical. Therefore, (5.31) holds for all X and Y , in particular, all .X = q m and .Y = q n , m and n in .Z. .
5.4 Combinatorial Interpretations If .n ≥ k ≥ 0 are two integers, then the binomial coefficient . nk is the number of subsets of size k of a set with n elements. This well-known and useful combinatorial interpretation of binomial coefficients is often taken as a definition. In an xy-coordinate system, . nk is also the number of paths from .(0, 0) to .(k, n − k), or to .(n − k, k), where a path is a continuous succession of eastward or northward one-unit steps. Reasons for seeking a simple combinatorial interpretation for Lucasnomials are of at least two kinds. On the one hand, there is an obvious mental satisfaction associated with such a finding. On the other, they are potentially useful: Some identities—identities have two sides—are given new proofs based on counting objects in two different ways, one for each side of the identity. This approach may also suggest new identities. We note that this combinatorial manner of proving identities was the object of a whole book [16]. Existing interpretations of Lucasnomials count weighted tiled paths. But we distinguish two main families of interpretations. Thus, we divide Sect. 5.4 into two subsections.
118
5 Some Properties of Lucasnomials
5.4.1 Square-and-Domino-Tiling Interpretations Given a rectangular .1 × n board, it is fairly well known that the number of ways to tile this board using square tiles which occupy one cell and dominos which cover two consecutive cells of the board is .Fn+1 , where .Fn is the n-th Fibonacci number. A variant of this is: In how many ways can one reach the top of a staircase of n steps if you can go up either one or two steps at once? (In fact, as mentioned earlier, the Fibonacci numbers were known in ancient India well before the days of Leonardo de Pisa: Both in some Sanskrit poetry and Tabla music, the rule was to use short and long syllables or short and long beats twice as long as the short ones. The number of combinations of a given length, thus, was a “Fibonacci” number. In Fibonacci’s population dynamics of a group of rabbits, you also have the mature rabbits that reproduce every period and the young ones that become adults after one period and, thus, require two periods to reproduce.) But let us return to our tilings with an example: If .n = 3, then there are .F4 = 3 tilings, namely, sss, ds, and sd, where s and d stand for a square and a domino, respectively. For each “sand-d” tiling T of an .1 × n board, we define the weight .w(T ) of the tiling T as the product of the weights of each of its tiles, i.e., .w(T ) = P s (−Q)d . The weight .|T | of a set of tilings .T is defined as the sum . T ∈T w(T ). Thus, if .Tn is the set of tilings of a rectangular .1 × n board using squares and dominos, then we find that .Un+1 = |Tn |, (5.32) where .U = U (P, Q) and, by convention, .|T0 | = 1. This follows by induction since tilings in .Tn ending with a square contribute .P |Tn−1 | to .|Tn | and tilings ending with a domino contribute .(−Q)|Tn−2 |. Hence, .|Tn | = P |Tn−1 | − Q|Tn−2 |. Clearly, .|T1 | = P = U2 and .|T2 | = P 2 − Q = U3 . Note that if .P ≥ 1 and .−Q ≥ 1, then tiling weights bear a concrete interpretation: We may think of squares coming in P different colors and dominos in yet .−Q distinct other colors. The Fibonacci case is singular as .P = −Q = 1 so that the weight .|T | of a set of tilings .T is simply the cardinality of .T . Note that our use of squares and dominos as the tiling modus operandi is linked to our observation (2.30) that .Un (P, Q) = Ψn (P, Q), where .Ψn is a homogeneous polynomial of degree .n − 1, if the variable P has degree 1 (the length of a square tile) and Q has degree 2 (the length of a domino). Example 79 The number of tilings with squares and dominos of a .1×(m−1) rectangular board is .Fm . Consider the number of such tilings that use a domino d to cover the two consecutive cells n and .n + 1. There are .Fn ways of tiling the initial cells .1, . . . , n − 1, and .Fm−n−1 ways of tiling the .m − n − 2 final cells .n+2, . . . , m−1. Hence, there are .Fn Fm−n−1 ways of simultaneously tiling the cells left of d and the cells right of d. The remaining tilings do not have a domino straddling over cells n and .n+1. So we can tile the first n cells (in .Fn+1 ways) and the last .m − n − 1 cells (in .Fm−n ways) independently. Therefore, .Fm = Fn Fm−n−1 +Fn+1 Fm−n . With P -weighted squares and .−Q-
5.4 Combinatorial Interpretations
119
weighted dominos, the same argument carries over, but the domino d has weight .−Q, so this reasoning yields a combinatorial proof of the important . identity (2.42), i.e., .Um = Un+1 Um−n − QUn Um−n−1 . n Thus, the numerator .Un Un−1 · · · Un−k+1 of . k U can be interpreted as the number of simultaneous square and domino (weighted) tilings of a collection of boards of respective length .n−1, n−2, . . . , n−k. Using this interpretation, Benjamin and Plott [17] were able to describe a procedure by which one could view the denominator .Uk · · · U1 of . nk U as subtilings of the numerator. Their procedure provided a first combinatorial explanation of the integrality of Lucasnomials. Interestingly, the associated Lucas sequence number .Vn = Vn (P, Q), .n ≥ 1, counts the number of circular weighted tilings of a .1 × n rectangular board. The tilings are made of squares and dominos with the same respective weights of P and .−Q, but it is possible to have a domino straddling over the n-th and the 1-st cells. These are sometimes called bracelet tilings. Thus, if .n = 2, then we can tile in three ways, two squares, or in two ways, one domino, giving 2 .V2 = P − 2Q. Example 80 We may prove again the first identity in (2.26), i.e., .Vm = Um+1 − QUm−1 , by observing that there are two kinds of tilings of a lengthm bracelet: the .−QUm−1 tilings with one domino covering both cells m and . 1 and the .Um+1 tilings with no such domino. m+n In 2010, two combinatorial interpretations of Lucasnomials . m U were found by Sagan and Savage [71]. The second uses circular tilings. We only describe the first. Any lattice path from .(0, 0) to .(m, n), where m and n are positive integers, i.e., a path consisting of .m + n unit steps, m going eastward and n northward, leaves n rows .(m1 , m2 , . . . , mn ) on its left, bounded by the y-axis, and m columns .(n1 , n2 , . . . , nm ) below the path and bounded southward by the x-axis. By tiling each row .mi , .1 ≤ i ≤ n, and each column .nj , .1 ≤ j ≤ m, with squares and dominos with the caveat that the tilings of the columns—to be legal—have to begin with a domino, we associate a weight to the given path. Here, the weight of one particular tiling of the m rows and n columns is the product of the individual weights of each row and column. The path weight is the sum of the weights of all legaltilings of the set of rows and columns associated with the path. Then . m+n m U is the sum of the path weights over all paths from .(0, 0) to .(m, n). If a column has 0 height, i.e., if .nj = 0, then this column is tiled with the empty tiling, which has a weight of 1. Although it does not begin with a domino, it is still legal. exists, If the j-th column has only one cell, i.e., if .nj = 1, then no legal tiling . If and the path weight is zero. Such a path does not contribute to . m+n m U m+n .U = F , then all legal tilings have weight 1. Thus, . m F counts the number of ways of drawing a path from .(0, 0) to .(m, n) and legally tiling the rows and columns. Hence, for a simple example, we choose .U = F , .m = 3, and .n = 2. Of the ten paths from .(0, 0) to .(3, 2), only four contribute, namely,
120
5 Some Properties of Lucasnomials
p = N N EEE, .p2 = EN N EE, .p3 = EEN N E, and .p4 = EEEN N . The two northward steps have to cling together for the path to have a legal tiling. The paths .p1 and .p2 have a weight of 1 because there is only one way to tile each of its rows and columns. Path .p3 has weight .2 × 2 × 1 × 1 × 1 = 4 for its two rows each have two tilings, while .p4 has weight .3 × 3 = 9 from its two rows of length three. Thus, the sum of the weights of all the legal paths is 5 .1 + 1 + 4 + 9 = 15 = (5 · 3)/(1 · 1) = (F5 · F4 )/(F2 · F1 ) = . 2 F
. 1
Remark 28 If instead of the Fibonacci sequence .F = U (1, −1), we chose .I = U (2, 1), the identity sequence, then squares have weight 2 and dominos weight .−1. Thus, using the above example, 4 .
w(pi ) = (−1)3 + 22 (−1)2 + (22 + (−1))2 (−1) + (23 + (−1)2 + 2(−1))2
i=1
= −1 + 4 − 9 + 16 = 10, which is the binomial coefficient . 52 as expected. However, this is certainly a roundabout way of counting the number of paths from .(0, 0) to .(3, 2). This remark points out a drawback of the interpretation in which, ideally, we would like to count paths in a natural way when dealing with ordinary binomial coefficients. A few years later [18], these two interpretations of Lucasnomials were restated in simple terms and illustrated with examples, mostly in the Fibonacci case. A couple of identities were combinatorially explained, and a few simple and appealing Fibonomial identities, taken from the existing literature, were listed as awaiting interpretation. Writing .k!F for .Fk Fk−1 · · · F1 , .(k ≥ 1), the combinatorial interpretation given by Sagan and Savage implies that .(m + n)!F = m!F · n!F · p , (5.33) p
where p is a path from .(0, 0) to .(m, n) and .p is the number of legal tilings of the n rows and m columns associated with p. Viewing .k!F as the number of ways of simultaneously tiling (with squares and dominos) k rows of respective lengths .k − 1, k − 2, . . . , 0, Killpatrick and Weaver [46] produced an explicit combinatorial bijection, as we may say, between the two sides of Equation (5.33). Recently [19], another combinatorial interpretation was discovered. It is similar, and in some sense isomorphic, to the Sagan and Savage interpretation we just described (see [19, end of Sect. 2]), yet more natural and apparently
5.4 Combinatorial Interpretations
121
more fruitful. In particular, it led to a first interpretation of Lucasnomial Catalan numbers, which we describe in Sect. 5.5.3. Let .sn be the upward staircase path which starts at the point .(n, 0) and ends at .(0, n) alternating west and northward unit steps: (n, 0) → (n − 1, 0) → (n − 1, 1) → (n − 2, 1) → · · · → (0, n − 1) → (0, n).
.
The staircase-shape region .Sn to the right of the y-axis, below the path .sn and above the x-axis, consists of .n − 1 horizontal rows of square boxes. Going upward, these rows are of respective lengths .n − 1, n − 2, . . . , 1. A tiling of .Sn is a tiling of each of these .n − 1 rows with squares and dominos. If, as before, a square tile has weight P and a domino has weight .−Q, then there are .Un Un−1 · · · U1 distinct tilings of .Sn . Here, .U = U (P, Q). Let k, .0 ≤ k ≤ n, be a fixed integer throughout the interpretation, since this interpretation is specific to the Lucasnomial . nk U . We begin by describing how, to any given tiling T of .Sn , we associate a unique path p through .Sn . The path p begins at the point .(k, 0) and ends at .(0, n) and is constructed uniquely as follows: The path is made of a succession of unit steps going either north or west. The path p moves northward unless we step out of the region .Sn , or unless a northward edge would cross over through the center of a domino in T , and, in these two cases, the path moves west. Note that a westward step is necessarily followed by a northward step, because of the staircase shape of .Sn and because dominos have length 2. Two tilings .T1 and .T2 of .Sn are equivalent if their associated paths p coincide. The number of tilings of an equivalence class will be shown to be a multiple of .Dk = (Uk · · · U1 )(Un−k · · · U1 ). Therefore, .Un Un−1 · · · U1 , the of tilings of .Sn , i.e., of all rows in .Sn , must be a multiple of .Dk , and number n . k U be an integer. But let us return to the path p associated with T . A northward step immediately following a westward step is called an NL step, because the two successive steps draw an L. Other northward steps are called NI steps. Construct a partial tiling .B = BT , a subtiling of T , by, in a given row, erasing the tiles that lie left of an NL step and erasing the tiles that lie to the right of NI steps. Note that two tilings of .Sn which produce the same partial tiling B must lie in the same equivalence class. The number of ways of completing the partial tiling B into a full tiling of .Sn is .Dk . Indeed, p must have k NL steps, and the i-th NL step has .k − i blank cells on its left, for .1 ≤ i ≤ k. Thus, .k − i varies from .k − 1 to 0, and these blank partial rows can be tiled in .Uk · · · U1 ways. There must be .n − k NI steps for the path p to reach the final point .(0, n) at altitude n. The i-th NI step, .1 ≤ i ≤ n − k, must have .n−k −i blank cells on its right, because, due to the staircase shape of .Sn , the number of cells right of an NI step is not affected by the number of NL steps that precede it. Thus, the blank partial rows right of NI steps can be tiled in .Un−k · · · U1 ways. Therefore, .w(T ) = Dk · w(B). An example of a tiling T
122
5 Some Properties of Lucasnomials
in .S6 is illustrated in Fig. 5.1, where an NI step is designated by an N and a west step followed by a north step by WN.
6 WN n = 6, k = 4
5 N
tiling T : sdd, ssd, sd, ss, s
4 N
partial tiling BT : shaded area
3
2 path p: WN, WN, WN, N, N, WN 1 s 0
1
d
d
2
× 4
3
5
6
Fig. 5.1 Example in .S6
We will say that a path p in .Sn from .(k, 0) to .(0, n) is tilable if it is associated with a tiling T of .Sn in the way previously described. Note that not all . nk lattice paths from .(k, 0) to .(0, n) made of westward and northward steps with no two consecutive westward steps are tilable. For instance, only three of the six such paths through .S4 starting at .(2, 0) are tilable. A partial tiling B is said to belong to p, and we write .B ∈ p, if .B = BT for some tiling T of .Sn with which p is associated. Two equivalent tilings do not usually produce the same partial tiling, because the non-erased parts of these tilings do not usually agree. If B is the partial tiling derived from T , we showed above that .w(T ) = Dk · w(B). Therefore, .Un · · · U1 = |Sn | = |Cl(p)| = w(B) · Dk , (5.34) p
p B∈ p
where the sums are over all tilable paths p from .(k, 0) to .(0, n) and .Cl(p) is the class of all tilings to which the same path p is associated with. Thus, the Lucasnomial . nk U is interpreted as a sum of weights of partial tilings. That is, n . = w(B), (5.35) k U p B∈ p
where the outer sum is over all tilable paths p from .(k, 0) to .(0, n).
5.4 Combinatorial Interpretations
123
5.4.2 An Interpretation Coming from q-Binomial Coefficients We begin with a well-known interpretation of q-binomial coefficients and mention two of its isomorphic variants before seeing how this interpretation carries over to Lucasnomials. Indeed, the Gaussian coefficient . nk q is well known to count weighted paths from .(0, 0) to .(k, n − k). These paths are non-decreasing in that they use only northward or eastward unit steps. To be precise, the identity k(n−k) n = ca q a k q a=0
.
(5.36)
holds, where .ca is the number of paths from .(0, 0) to .(k, n − k) such that the area under the path and above the x-axis is a. Thus, the weight of a path of area a is .q a . When .q = 1, all paths have weight 1 and . nk q = nk , which simply counts paths. As observed in Remark 28, interpretations of Lucasnomials given in [19, 71] have the drawback of not falling back on this natural interpretation of ordinary binomial coefficients. Konvalina [51, eq. (19)] observed that the q-binomial coefficient . nk q satisfies the identity n . = q i1 +i2 +···+ik , (5.37) k q 0≤i1 ≤i2 ≤···≤ik ≤n−k
which he interpreted by using boxes and balls. Suppose there are .n − k + 1 boxes, where box i, .0 ≤ i ≤ n − k, contains .q i balls. Then . nk q is the number of ways of selecting k boxes and one ball from each box. The same box may be chosen several times, the ball being returned to its box, if formerly chosen. Note that this interpretation is in one-to-one correspondence with the above area-weighted path interpretation. Say we walk along a given path from .(0, 0) to .(k, n−k). We will encounter exactly k horizontal edges of successive heights .0 ≤ h1 ≤ h2 ≤ · · · ≤ hk ≤ n − k. The vector .(h1 , h2 , . . . , hk ) actually defines the path and corresponds to choosing the boxes numbered .h1 , h2 , . . . , hk . The number of ways of choosing the k balls is .q j hj , which is .q a , where a is the area subtended by our path. Recently, a variant of the above interpretation of q-binomial coefficients was exploited to explain combinatorially various q-identities [3]. The authors chose to work with a tiling interpretation “isomorphic” to the weighted path counting (5.36). That is, there is a one-to-one weight-preserving correspondence between paths and tilings. Tile a .1 × n board with n square tiles, k blue and .n − k of color red. Walking along the path from .(0, 0) to .(k, n − k), place a red tile for a north step and a blue one for an eastward step. The
124
5 Some Properties of Lucasnomials
weight of a red tile is 1, and the weight of a blue one is .q i , if that blue tile is preceded by i red tiles. The weight of the board tiling is the product of the weights of individual tiles. This bijection clearly preserves weight as the area below an eastward step matches the number of northward steps that precede it. Thus, . nk q is the number of tilings of a .1 × n board with exactly k blue tiles. The identity
n−1 n n−k n − 1 . = +q , k k q k−1 q q
(5.38)
for instance, is easily seen to hold using this interpretation. Indeed, tilings that end with a blue tile contribute .q n−k n−1 k−1 q , while tilings that end with a n−1 n red tile contribute . k q . The symmetry identity . nk q = n−k is explained q within the frame of this tiling interpretation in [3, p. 101]. Identity (5.6) may then be obtained by reasoning as we did for identity (5.38). Consider the set of tilings of a .1 × n board with .n − k blue tiles. The contribution of tilings n−1 = q k n−1 that end with a blue tile is .q k n−k−1 k q , while the contribution of q n−1 those ending with a red tile is . n−k = n−1 k−1 q . q Finally, we observe that the area-weighted path, and correspondingly the box-and-ball choosing or the weighted tiling interpretations of q-binomial coefficients, generalizes to Lucasnomials. Suppose Lucasnomials satisfy a Pascal-like relationship n−1 n−1 n . = xk + yn−k , (5.39) k k−1 U k U U for all integers n and k, for some sequences .(xn ) and .(yn ). (Note that taking n = 1 and .k = 0 implies .x0 = 1, while .n = k = 1 yields .y0 = 1.) Say a horizontal (eastward) edge of height h has weight .yh and a vertical (northward) edge at distance d from the y-axis, i.e., of abscissa d, has weight .xd . .(0, 0) to .(k, n − k) as the product of the Define the weight of a path from weights of its edges. Then . nk U is the sum of the weights of all paths from .(0, 0) to .(k, n − k). This can be seen by induction on n using (5.39). Note that 1 . of a vertical edge of 0 U = 1 and the only path from .(0, 0) to .(0, 1) is made 1 abscissa 0 and, thus, of weight .x0 = 1. Similarly, . 1 U = 1, and the one-edge path from .(0, 0) to .(1, 0) has weight .y0 = 1. Paths from .(0, 0) to .(k, n − k) that reach .(k, n − k) through .(k − 1, n − k) followed by a horizontal edge of height .n − k account for a cumulative weight equal to .yn−k n−1 k−1 U . The other paths must go through .(k, n − k − 1) and end with a vertical edge of abscissa k. Hence, their cumulative weight is .xk n−1 k U . The conclusion follows from (5.39). The corresponding “isomorphic” tiling interpretation of . nk U uses a .1 × n board with k blue and .n − k red square tiles. The weight of a blue tile, which is preceded by m red tiles, is .ym , and the weight of a red tile, preceded by .
5.5 Lucasnomial Catalan Numbers
125
m blue tiles, is .xm . The weight of a tiling is the product of all the individual weights of its tiles. Then . nk U is the sum of the weights of all tilings that use k blue tiles and .n − k red ones (or vice versa). Note that the Pascal-like identities (5.6), (5.7), (5.13), (5.20), and (5.21) are all special cases of the general type (5.39). Let us put to use this tiling interpretation mimicking an argument made in [3] in the context of Gaussian coefficients. The argument works if we require the sequences .(xn ) and .(yn ) to be geometric. Theorem 81 Suppose U is a fundamental Lucas sequence and .(xm ) and .(ym ) are geometric sequences for which (5.39) holds. Then .
2n n
= U
n k=0
xkk
n−k yn−k
2 n . k U
(5.40)
Proof A tiling of a .1 × 2n board with n red and n blue tiles can always be viewed as a concatenation, .(1 × n) × (1 × n), of two consecutive half-boards. If there are k blue tiles in the first half-board, then there are .n − k in the second half-board. Each of the k red tiles in the second half-board sees its local weight (i.e., its weight within this second half-board) multiplied by .xk due to the presence of the extra k blue tiles in the first half-board. Each of the .n − k blue tiles in that second half has an extra .n − k red tiles to its left lying we in the first half-board. It sees its weight multiplied by .yn−k . Globally, nhave to multiply the product of the weights of the two half-boards . nk U × n−k U n−k by the factor .xkk · yn−k . Summing over all possible k yields the result. . The identities (5.7) and (5.21) involve geometric sequences. Thus, using, say, (5.7), we obtain 2 n 2 2 2n n = αk β (n−k) . n U k U
.
(5.41)
k=0
It is easy to verify that if (5.39) holds with .(xm ) and .(ym ) geometric, i.e., with .xm = am and .ym = bm for all .m ≥ 0, then .a + b = P and .ab = Q. Hence, (5.39) is necessarily one of the two identities (5.7) or (5.21).
5.5 Lucasnomial Catalan Numbers 5.5.1 Introduction The Catalan numbers .Cn , although they pop up in various areas of mathematics and have very many combinatorial interpretations, are often defined via the simple algebraic expression
126
5 Some Properties of Lucasnomials
Cn =
.
2n 1 . n+1 n
(5.42)
It is not necessarily immediate from 2n (5.42) that they are integers. How− ever, .Cn is the difference . 2n n n−1 . We have .C0 = C1 = 1, .C2 = 2, .C3 = 5, .C4 = 14, .C5 = 42, .C6 = 132, and .C7 = 429. The ratio .Cn+1 /Cn tends to 4 as n tends to infinity. They satisfy the convolution identity n .Cn+1 = C C . Their generating function C satisfies .xC 2 − C + 1 = 0 √i=0 i n−i 1− 1−4x and is . 2x . A rich book [76] was written on their various combinatorial interpretations, properties, and generalizations. Here, we single out two specific generalizations, the Fuss-Catalan and the generalized Fuss-Catalan numbers. Given .a ≥ 2 and .r ≥ 1 integers, the generalized Fuss-Catalan numbers .Ca,r (n) are defined as an + r − 1 an + r r r .Ca,r (n) = (5.43) = , (a − 1)n + r n an + r n for all .n ≥ 0, and are integers. In fact, they possess at least one combinatorial interpretation, counting Raney sequences [33, pp. 359–363]. The FussCatalan numbers correspond to the case .a ≥ 2 and .r = 1 and have many interpretations that extend some interpretations of the Catalan numbers. We next illustrate how a few classical interpretations of the Catalan numbers extend to .C3,1 (n). The Catalan number .Cn is: 1. The number of triangulations of a convex .(n+2)-gon into n triangles (using .n − 1 non-intersecting diagonals) 2. The number of meaningful parenthesizations in the product of .n + 1 elements .a1 ∗ a2 ∗ · · · ∗ an+1 , where .∗ is a binary operation 3. The number of paths with .(1, 0) or .(0, 1) moves from .(0, 0) to .(n, n) which start with a .(1, 0) move and do not cross over the line .y = x 4. The number of ballot sequences of length 2n, i.e., finite sequences .(ai )1≤i≤2n
k with terms .ai = ±1, nonnegative partial sums . i=1 ai , and zero complete
2n sum . i=1 ai = 0 5. The number of non-crossing partitions of .[n] = {1, 2, . . . , n}, i.e., such that if .a < b < c < d, a and c belong to the same block B, b and d to .B , then .B = B 6. The number of binary trees with n vertices Correspondingly, we find that .C3,1 (n) = number with .a = 3, is:
3n 1 2n+1 n
, the n-th Fuss-Catalan
1. The number of slicings of a .(2n + 2)-polygon into n quadrilaterals 2. The number of meaningful parenthesizations in the product of .2n + 1 elements .a1 ∗ a2 ∗ · · · ∗ a2n+1 , where .∗ is a ternary operation (elements are multiplied three at a time)
5.5 Lucasnomial Catalan Numbers
127
3. The number of paths with .(1, 0) or .(0, 1) moves from .(0, 0) to .(2n, n) which start with a .(1, 0) move and do not cross the line .x = 2y 4. The number of finite sequences of length 3n, .(ai )1≤i≤3n , with terms .ai ∈
k
3n {1, −2} and nonnegative partial sums . i=1 ai and . i=1 ai = 0 5. The number of non-crossing partitions of .[2n] into blocks all of even cardinality 6. The number of planar ternary trees with .2n + 1 vertices The point of this section is to present some generalizations of Catalan numbers with respect to Lucas sequences and some recent work on these generalizations. Clearly, there is much yet to discover.
5.5.2 Definition and Integrality Given a nondegenerate fundamental Lucas sequence .U = U (P, Q) and integers .a ≥ 2 and .r ≥ 1, it is easy and tempting to define generalized Lucasnomial Fuss-Catalan numbers .CU,a,r (n) as an + r − 1 an + r Ur Ur = , (5.44) .CU,a,r (n) = n n U(a−1)n+r Uan+r U U in algebraic analogy to (5.43). If .r = 1, then we obtain the Lucasnomial Fuss-Catalan numbers an 1 . (5.45) .CU,a (n) = CU,a,1 (n) = U(a−1)n+1 n U The Lucasnomial Catalan numbers .CU (n) := CU,2,1 (n) are defined by 2n 1 . (5.46) .CU (n) = Un+1 n U When U is the Fibonacci sequence F , then they are known as Fibonomial Catalan numbers. Here as in other instances in the theory of Lucas sequences, the discovery of these Lucasnomial Catalan generalizations came from two independent sources: the Fibonacci and the q-numbers. On the Fibonacci side, the discovery seems to date to the early 1970s when Gould [36] listed the first 50 Fibonomial Catalan numbers. Gould [35] gave a proof of their integrality. This proof would in fact carry over to all Lucasnomial Catalan numbers for U a regular sequence. Actually, replacing n and k by, respectively, 2n and n in Equation (5.13), one obtains 2n 2n − 1 2n − 1 . = Un+1 − QUn−1 , n U n n−1 U U
128
5 Some Properties of Lucasnomials
which, after division by .Un+1 , is readily seen to yield 2n − 1 2n − 1 .CU (n) = −Q , n n−2 U U
(5.47)
as noted in [25]. Thus, Lucasnomial Catalan numbers are integers with no restrictive hypotheses on U . Lucasnomial Fuss-Catalan numbers are also integers for all choices of U ; see [13, Thm. 6]. A combinatorial interpretation of Lucasnomial Fuss-Catalan numbers, valid for all choices of U , was found recently [19], as we will see in Sect. 5.5.2. Incidentally, this interpretation provides a second integrality proof. Generalized Lucasnomial Fuss-Catalan numbers were shown to have a nonnegative p-adic valuation for all regular primes p in [13, Thm. 9] and so to be integers for U regular. Their valuation with respect to a special prime p was shown to be nonnegative a little later [15, Thm. 6]. Hence, generalized Lucasnomial Fuss-Catalan numbers are always integers as well. However, to this day, no combinatorial interpretation for these numbers is known. On the q-number side, several q-generalizations of the Catalan numbers were discovered and studied in the 1960s and 1970s by MacMahon, Carlitz, and P´ olya in particular (see [30] for a list of references). They were called q-Catalan numbers. Further encompassing generalizations [30] were proposed and given combinatorial interpretations. One may also consult Exercise A43 [76, p. 121]. The Carlitz q-Catalan numbers .cq (n) derive very naturally from both the interpretation (5.36) of Gaussian coefficients and the interpretation 3. of the Catalan numbers stated in Sect. 5.5.1. They satisfy .cq (n) = q a(p) , (5.48) p∈Cn
where .Cn is the set of Catalan paths, i.e., paths from .(0, 0) to .(n, n) that remain below the segment joining .(0, 0) to .(n, n). Here, .a(p) is the area subtended by the path p. Actually, they were given the equivalent interpretation .cq (n) = q inv(w) , (5.49) w∈Wn
where .Wn is the set of binary words .w = w1 w2 · · · w2n of length 2n such that the number of 1s never exceeds the number of 0s in any prefix of the word w and inv(w) is the number of inversions, i.e., of .(i, j)s, .i < j, such that .wi > wj . Each such word is in bijection with a Catalan path if a 0 corresponds to a horizontal edge and a 1 to a vertical edge. A moment of thought and one sees that the area under a path is also the sum of the row areas east of vertical edges, which is what inversions measure.
5.5 Lucasnomial Catalan Numbers
129
Another natural q-generalization of Catalan numbers is obtained from n −1 . This generalization was traced (5.46) on replacing .Un by the q-number . qq−1 back to MacMahon [57, Vol. 2, p. 214] in the paper [30]. The MacMahon q-Catalan numbers .Cq (n) had the following combinatorial interpretation: .Cq (n) = q maj(w) , (5.50) w∈Wn
where .Wn is the set of binary words .w =
w1 w2 · · · w2n as defined above and maj(w), the major index of w, is the sum . {1≤iwi+1 } i. For instance, Cq (3) =
.
1 q 4 −1 q−1 2
6 (q 3 + 1)(q 5 − 1) (q 6 − 1)(q 5 − 1) = · = 3 3 q (q + 1)(q − 1) (q − 1)(q 2 − 1)
= (q − q + 1)(q 4 + q 3 + q 2 + q + 1) = q 6 + q 4 + q 3 + q 2 + 1. The five sequences in .W3 contribute, respectively, .
000111
q0 = 1
001011
q3
001101
q4
010011
q2
010101
q 2+4 = q 6
Remark 29 The number .Cq (n) is also a sum of weighted paths. Indeed, the interpretation of .Cq (n) using the major index has an isomorphic weighted path interpretation when, in place of .Wn , we return to the set of Catalan paths .Cn . Define the weight of a Catalan path as the product of the weights of all its edges, where a horizontal edge of height h has weight .q h but only if that edge is immediately followed by a vertical edge. Similarly, the weight of a vertical edge of abscissa d is .q d , if it is immediately preceded by a horizontal edge and if .d < n. All other edges have weight 1. Then .Cq (n) = w(p), p∈Cn
where .w(p) is the weight of the path p. Remark 30 The identity (5.47) applied to q-binomial coefficients yields 2n − 1 2n − 1 .Cq (n) = −q . n−1 q n−2 q With the tiling interpretation of q-binomial coefficients with red and blue square tiles, isomorphic to the area-weighted interpretation, the above identity gives a combinatorial interpretation of .Cq (n) as tiling weights of .1 × 2n
130
5 Some Properties of Lucasnomials
boards with .n + 1 blue tiles. It is the weight of all such tilings that start with a blue tile minus the weight of all those tilings such that the last blue tile is immediately preceded by a red tile. It would be worth examining whether the various q-Catalan numbers and their interpretations could find extensions in the context of Lucasnomials.
5.5.3 Interpretation of Lucasnomial Catalan Numbers The only existing combinatorial interpretation of Lucasnomial Catalan numbers .CU (n) to date [19] is based on a small alteration of the interpretation of Lucasnomials obtained in (5.35) at the end of Sect. 5.4.1. We now describe it with the notation and terminology we had used to obtain (5.35). Consider the region .S2n and a tiling T of .S2n . Assume .k = n − 1. Let p be the path from .(n − 1, 0) to .(0, 2n) associated with T . Then .B = BT is the partial tiling obtained from T by erasing tiles right of NI steps and left of NL steps. A subtiling C of T , slightly modified from B, is now defined. The Catalan partial tiling C is identical to B in all rows except for the initial row of length .2n − 1. The first row of C is left fully untiled if the initial step of p is northward, i.e., if it is an NI step. So compared to B, the tiling C has an additional string of .n − 1 empty cells left of the NI step. If the initial step is westward, yielding an NL step, then C only retains the domino east of that NL step, thus leaving an extra string of .(2n − 1) − (n − 2) − 2 = n − 1 blank cells to the right of the domino compared with B. Note in passing that .C = CT is sufficient to re-trace the path p associated with T . By (5.32), .w(B) = w(C) × w(1 × (n − 1) board) = w(C) · Un . If B is derived from T ,
then .w(T ) = Dn−1 · w(B). Since .|S2n | = p B∈p w(B) · Dn−1 , we find that 2n |S2n | 1 = w(C). = . Un n − 1 U Un Dn−1 p C
Hence, as the Lucasnomial Catalan number .CU (n) = 2n 1 . Un n−1 U , we see that CU (n) =
.
p
w(C),
2n 1 Un+1 n U
is equal to
(5.51)
C
where the outer sum is over all tilable paths p from .(n − 1, 0) to .(0, 2n) and the inner sum over all Catalan partial tilings C associated with p. Remark 31 The above interpretation is applicable to explaining combinatorially the identity (5.47); see [19, Prop. 4.3].
5.5 Lucasnomial Catalan Numbers
131
Extending the idea presented above, i.e., by defining partial tilings from paths in .S(a+1)n , the authors [19] also provided a combinatorial interpretation of Lucasnomial Fuss-Catalan numbers (a + 1)n 1 . .CU,a (n) = n Uan+1 U
5.5.4 The Search for Catalan-Like Triples Given a nondegenerate Lucas sequence .U = U (P, Q) and integers .a ≥ 2 and .DU,a,k as the set of positive integers n such that .U(a−1)n+k divides k,andefine . . The complementary set of .DU,a,k in the positive integers is denoted n U by .DU,a,k . Because for all integers n, .|Un (P, Q)| = |Un (−P, Q)|, the two sets .DU (P,Q),a,k and .DU (−P,Q),a,k are identical. Hence, we may and will assume that .P > 0. If .k = 1, then since Lucasnomial Fuss-Catalan numbers (5.45) are integers, .DU,a,1 = N. Are there other triples .(U, a, k) with .k = 1 for which .DU,a,k = N? Such triples are called Catalan-like triples for obvious reason. If .U = U (2, 1) = I, the sequence of natural numbers, then there are no Catalan-like triples of type .(I, a, k) with .k = 1. Pomerance [69, Thm. 1] showed that .DI,2,k is 1 with a marked difference in the size of .DI,2,k depending infinite when .k = on whether .k ≤ 0 or .k ≥ 1. If .k ≤ 0, then .DI,2,k has an upper asymptotic density less than .0.25135. If .k ≥ 1, then .DI,2,k has asymptotic density 1; see [69, Thm. 2]. A subset S of the positive integers has an asymptotic density equal to .d = d(S) ∈ [0, 1] if a certain limit exists and is d, i.e., if .
#S(N ) = d, N →∞ N lim
where .#S(N ) is the number of integers n in S within the interval .[1, N ]. The ¯ is the upper limit, or the limsup (or upper asymptotic density of S, .δ(S), .lim), of the sequence .(#S(n)/n). The lower asymptotic density of S is given by the liminf of .(#S(n)/n). Pomerance [69, Thm. 3] had shown that if .k ≤ 0, then .DI,2,k is infinite, ¯ I,2,k ) ≤ 1 − log 2, a bound that was lowered to .1 − log 2 − but small with .δ(D 0.05551 ≈ 0.25134 by Sanna [72]. The argument of Pomerance was extended ¯ I,a,k ) ≤ 1 − log 2. It to all .a ≥ 2 [13, Thm. 15] to show that for .k ≤ 0, .δ(D follows that for .k ≤ 0, .DI,a,k has a positive lower asymptotic density and, in particular, is infinite. The set .DI,a,k is also infinite for all .a ≥ 2 and all .k ≥ 2 by [13, Prop. 29]. It is thought that .DI,a,k is infinite for all .a ≥ 3 when .k ≤ 0. A partial result in this direction is obtained in [13, Thm. 16]. We point out that although we know .DI,2,0 , the set of .n ≥ 1 such that n divides the central binomial coefficient . 2n n , is infinite, and has small upper asymptotic
132
5 Some Properties of Lucasnomials
density, it is not known whether it has a positive lower asymptotic density; see the discussion in [13, p. 17]. Moreover, Ballot [13, Thm. 37] showed that for .U (P, Q) any regular sequence and for any .a ≥ 2, .DU,a,k has asymptotic density 1 for all .k ≥ 1. On the other hand, he showed [13, Thm. 14] that for .k ≤ 0 and U regular and standard (.P 2 = 4Q), the set .DU,a,k is finite. Hence, the only hope to find 1 must occur for .k ≥ 2. Catalan-like triples for U regular and .k = For .U (P, Q) regular, all Catalan-like triples are known. There are precisely five such triples with .P > 0. All are of the shape (U, a, k) = (U (1, Q), a, 2).
.
The first one found is .(U (1, 2), 2, 2). It was shown in [12, Thm. 3.5] to be the only example with .a = 2. The others were determined in [13, Thm. 30]; two occur with .a = 4 (.Q = 2 and .Q = 3): one for .a = 6 and .Q = 5 and the remaining one for .a = 12 and .Q = 2. The regularity hypothesis was made because the search relied on the classification [1, 20] of all regular Lucas sequences U with terms .Un lacking a primitive prime divisor; see also our Sect. 4.5 on primitive divisors. It is an important theorem of [20] that if U is regular, all terms .Un have a primitive prime divisor if .n > 30. The sequence .U (1, 2) is outstanding in this respect because it is the only regular sequence having defective† terms .Un with .n ≥ 13. If it were not for this sequence, the theorem on primitive prime divisors would hold for .n > 12 rather than .n > 30. The question of finding some combinatorial interpretation for the 2n 1 numbers . Un+2 n U , for .U = U (1, 2), arises, as it does for the four other Catalan-like triples. It was discovered [13, Thm. 38] that given any triple .(U, a, k), U regular, .a ≥ 2, and .k ≥ 1, there exists a minimal positive integer .m = m(U, a, k) such that for all .n ≥ 1, an m is an integer. . U(a−1)n+k n U We say the triple .(U, a, k) belongs to m. Thus, all triples with .k = 1 and the five Catalan-like triples belong to .m = 1. It was found that the triples .(F, 2, 2) and .(F, 3, 2), resp., belong to .m = 2 and .m = 3; see [12, Prop. 3.2 & 4.2] and [13, Rmk. 19]. Integrality proofs used in the papers [12, 13, 69] are arithmetic: 2n show They 3n , . , or .3 that for all primes p, the p-adic valuation of say . 2n n n U n F is at least equal to the p-adic valuation of, resp., .n + 1, .Un+1 , or .F2n+2 . The p-adic valuation of the terms of Lucas sequences was studied in Sects. 2.4 and 2.5 and for special primes in Sect. 2.12. The p-adic valuation of binomial coefficients † .U is defective if it does not have a primitive prime divisor not dividing D; this notion is n entirely different from that of a defective integer m with respect to a sequence X defined in Sect. 4.6.
5.6 The p-Adic Valuation of Lucasnomials
133
and Lucasnomials in general is the object of the next section. In particular, a generalized Kummer rule is available to determine the p-adic valuation of Lucasnomials.
5.6 The p-Adic Valuation of Lucasnomials The p-adic valuation of Lucasnomials . m+n , p a regular prime, is amenable n U to generalized Kummer rules on the one hand. On the other hand, several papers have determined the p-adic valuation of some types of Lucasnomials, mostly Fibonomials, in direct ways.
5.6.1 A Generalized Kummer Rule We first recall and re-prove Kummer’s rule [53]. Suppose p is a prime number. The Kummer rule says that the p-adic is the number of carries that occur valuation of the binomial coefficient . m+n n when adding m and n in base p. For example, to find out the value of .ν3 29 5 , we execute the base-3 addition of 24 and 5. Since .24 = 2 · 9 + 2 · 3 = (2, 2, 0)3 and .5 = 1 · 3 + 2·291= (0,2 1, 2)3 , this addition generates two carries. Thus, 29 2 .3 || 5 . Indeed, . 5 = 3 · 5 · 7 · 13 · 29. Let us prove the Kummer rule. Suppose the base-p expansions of m and n are m = m p + m−1 p−1 + · · · + m0 ,
.
n = n p + n−1 p−1 + · · · + n0 , where all p-ary digits of m and n, .mi and .ni , belong to .[0, p−1], and .m +n > 0. Let .i ≥ 0. Then, as one performs, in successive left-to-right columns, the base-p addition of m and n, a nonzero carry .ci = 1 occurs between columns i and .i + 1 iff .(m0 + m1 p + · · · + mi pi ) + (n0 + n1 p + · · · + ni pi ) ≥ pi+1 . That is, m n .ci = 1 ⇐⇒ { } + { i+1 } ≥ 1. (5.52) pi+1 p
On the other hand, using the Legendre formula .νp (N !) = i≥1 pNi , we find that m+n .νp = νp ((m + n)!) − νp (m!) − νp (n!) n m + n m n − i+1 − i+1 . = p p pi+1 i≥0
134
5 Some Properties of Lucasnomials
For two real numbers x and y, the expression .x + y − x − y is either 0 or 1. It is 1 if and only if the sum of the fractional parts .{x} + {y} ≥ 1. Hence, m n m+n n m + i+1 ≥ 1. . − i+1 − i+1 = 1 ⇐⇒ p p pi+1 p pi+1 It follows from (5.52) that the p-adic valuation of . m+n corresponds to the n number of carries .ci , .i ≥ 0, in the base-p addition of m and n. Ward [79] uses a similar reasoning to prove that generalized binomial coefficients with respect to a strongly divisible sequence .X = (xn )n≥1 are always integers. Define a sequence X of integers to be regularly divisible if for any prime p and integer .a ≥ 1 such that .pa divides some term .xn , .n ≥ 1, .pa | xt iff .ρa | t, where .ρa := ρ(pa ) is the rank of .pa in X. If some power .pa of p does not divide any term of X, then we set .ρa = ∞. Ward first proves that a divisible sequence X is strongly divisible if and only
if it is regularly divisible. Legendre’s formula becomes .νp (xn xn−1 · · · x1 ) = a≥1 n/ρa . Since m+n . is an integer iff .νp m+n ≥ 0 for all primes p, their integrality n n X X follows by observing that m n m+n . ≥ + , ρa ρa ρa for all p and .a ≥ 1. Knuth and Wilf [52] expanded on the ideas of both Kummer and Ward. In fact, they prove that a sequence X of positive integers is strongly divisible iff X is regularly divisible [52, Prop. 2]. Essentially, the small difference here with Ward’s result is that the equivalence is proved without assuming X to be divisible. Knuth and Wilf give Kummer rules for Gaussian coefficients and Fibonomials. We derive below a Kummer rule for general Lucasnomials which is an easy adaptation [11, Sect. 4] of the rule for Fibonomials. Theorem 82 (The Kummer rule for Lucasnomials) Let .U (P, Q) be a nondegenerate fundamental Lucas sequence and .p Q a prime of rank .ρ and rank exponent.ν. Ifp is odd or if P Q is even, then the p-adic valuation of the is equal to the number of carries across or to the left Lucasnomial . m+n n U of the radix point when adding .m/ρ and .n/ρ in base p, where a carry across the radix point has weight .ν instead of 1. If .p = 2 and P Q is odd, then the same counting applies except that the weight of a carry between the first and the second place left of the radix point is .ν2 (P 2 − 3Q) instead of 1. Remark 32 An alternate wording of Theorem 82 is possible carrying out the addition of m and n in the mixed base .(. . . , p−1 ρ, . . . , pρ, ρ, 1). Thus, .m = m p−1 ρ + · · · + m1 ρ + m0 , where .0 ≤ m0 < ρ and .0 ≤ mi < p for .i ≥ 1. The advantage is that there are no fractional parts, but the disadvantage is that we are usually less familiar with the use of mixed bases. Of course, a carry
5.6 The p-Adic Valuation of Lucasnomials
135
emanating from the initial column is worth .ν, and one from the second to the third column is 1 unless .p = 2 and P Q is odd when it is .ν2 (P 2 − 3Q). Proof Suppose first p is odd or .p = 2 and P Q even. Then with the notation .m!U = Um Um−1 · · · U1 , we have, by Theorem 8, a generalized Legendre formula m (5.53) .νp (m!U ) = . ρ(pi ) i≥1
Thus, using Corollaries 11 and 15, we find that m ρpi−ν ρ i=1 i≥ν+1 m m =ν . + ρ ρpi
ν (m!U ) =
. p
ν m
+
i≥1
Hence, ν
. p
m+n m+n m n =ν − − n ρ ρ ρ U m/ρ + n/ρ m/ρ n/ρ + − i+1 − i+1 . p p pi+1 i≥0
The first term on the RHS above is either 0 or .ν. It is .ν iff .{m/ρ}+{n/ρ} ≥ 1, i.e., iff a carry occurs over the radix point in the addition of .m/ρ and .n/ρ in base p. As in the proof of the Kummer rule for binomial coefficients, a carry occurs between columns i and .i + 1 (.i ≥ 0) in the addition of .m/ρ and .n/ρ n/ρ iff .{ pm/ρ i+1 } + { pi+1 } ≥ 1, which happens whenever .
n/ρ m/ρ m/ρ + n/ρ − i+1 − i+1 = 1. p p pi+1
A slight hiccup in the above argument occurs when .p = 2 and P Q is odd. This is explained by Remark 16. Here, .ρ = 3. Putting .c = ν2 (P 2 − 3Q) and observing that .ρ(2i ) = 6 for all i, .ν + 1 ≤ i ≤ ν + c, we see that ν m
ν+c m m + 3 6 6 · 2i−ν−c i=1 i=ν+1 i≥ν+c+1 m m m =ν . +c + 3 6 6 · 2i
ν (m!U ) =
. 2
+
i≥1
Hence,
136
5 Some Properties of Lucasnomials
ν
. 2
m+n n U m+n m n m+n m n =ν − − +c − − 3 3 3 6 6 6 (m/3) + (n/3) m/3 n/3 + − i+2 − i+2 . 2i+2 2 2 i≥0
m n − 6 − 6 is 1 precisely when a carry occurs between The quantity . m+n 6 the first and the second digits left of the radix point in the addition of .m/3 and .n/3 in base 2. Its weight is c. . Example of the Fibono 83 Suppose we wish to know the 2-adic valuation 2 . Note that .ρ(2) = 3, .ν = 1, and .ν2 (P − 3Q) = 2. A direct mial . 18 7 F calculation using Theorems 8 and 14 gives 18 F12 F15 F18 F18 · · · F12 ∼ . ∼ (base 2). 7 F 7!F F3 F6 Now .ν2 (F12 F15 F18 ) = (1 + ν2 (F6 )) + (0 + ν2 (F3 )) + (0 + ν2 (F6 )) = 4 + 1 + 3 = 8, while .ν2 (F3 F6 ) = 1 + 3 = 4. Thus, .ν2 18 7 F is the difference .8 − 4 = 4. Using Theorem 82, we need to add .11/3 and .7/3 in base 2. Since .11/3 = (1, 0, 0, 1)2 + 2/3 and .7/3 = (0, 0, 1, 0)2 + 1/3, we see that there is a carry across the radix point as .2/3 + 1/3 = 1 ≥ 1 which creates another two in the first two places left of this point. So we find three carries with the middle one worth 2. Alternatively, using Remark 32, in the mixed base .(. . . , pρ, ρ, 1) = (. . . , 6, 3, 1), we have .11 = 6 + 3 + 2 = (1, 1, 2) and .7 = 6 + 1 = (1, 0, 1). There are again three carries, and the second one has a . weight of 2. Application 84 Let us use an arithmetic 2nargument to prove that the Fi1 bonomial Catalan number .CF (n) = Fn+1 n F (.n ≥ 0) is an integer. If .CF (n) is a non-integral rational number, there must exist a prime p for which its is an integer, p must divide .Fn+1 . Thus, valuation is negative. Since . 2n n F by Theorem 8, there is a positive integer .λ such that .n + 1 = λpe ρ, where .ρ = ρ(p), .e ≥ 0, and .p λ. By Lemmas 11 and 13, we see that ν + e, if p is odd; .νp (Fn+1 ) = ν + ((e − 1) + c) · [e ≥ 1], if p = 2, where again .ν is the rank exponent of p and here, since .F = U (1, −1), c = ν2 (P 2 − 3Q) = ν2 (4) = 2. To find out the p-adic valuation of . 2n n F , we add .n/ρ to itself in base p and count carries according to Theorem 82. Since
.
.
n ρ−1 1 , = λpe − = (λpe − 1) + ρ ρ ρ
5.6 The p-Adic Valuation of Lucasnomials
137
we see that the e least significant p-ary digits of .λpe − 1 are all .p − 1 and that the fractional part of .n/ρ is .(ρ − 1)/ρ ≥ 1/2. Hence, this addition produces at least .e + 1 carries. By Theorem 82, these carries imply that ν + e, if p is odd; 2n .νp ≥ n F ν + ((e − 1) + c) · [e ≥ 1], if p = 2. Hence, .νp
2n n F
≥ νp (Fn+1 ) and .νp (CF (n)) ≥ 0. This is a contradiction.
.
Remark 33 The same argument as in the above application would show that the p-adic valuation of a Lucasnomial Catalan number .CU (n) is nonnegative if .p Q. If .p | Q and .p P , then by Lemma 6, no term of U is divisible by p. In this case, .νp (CU (n)) = 0. It remains to evaluate .νp (CU (n)) when p is a special prime, i.e., when .p | gcd(P, Q). When p is special, then Theorem 46 describes .νp (Un ) for all .n ≥ 1. It is then possible to evaluate the p-adic valuation of any generalized Lucasnomial Fuss-Catalan number .CU,a,r (n); see (5.44) for their definition. It was shown in the proof of [15, Thm. 6] that this valuation is always nonnegative. In particular, .νp (CU (n)) ≥ 0 if .p | gcd(P, Q). There is no Kummer rule for evaluating the p-adic valuation of Lucasnomials when p is special, so an explicit description was given in [15, Thm. 1]. The main ingredient of the proof was Theorem 46. We restate the result below. Suppose .U = U (P, Q), where .P = pa P , .Q = pb Q , p is a prime, a and b are positive, and .p P Q . Let m and n be positive integers and .rm and .rn be the respective remainders of the Euclidean divisions of m and of n by 2p. Then the next theorem holds. Theorem 85 The p-adic valuation of the Lucasnomial . m+n is n U .
b mn 2
m+n
· [b = 2a], U n m+n
+ νp n2 + a + νp ( m+1 2 ) · [P1 ] + c · [P2 ],
amn + νp
if b ≥ 2a; if b < 2a,
2
where .U is the Lucas sequence .U (P , Q ), .c = νp (P 2 − Q ), .[−] denotes as usual the Iverson symbol, and .P1 and .P2 are the following conditions: • .P1 : m and n are odd. • .P2 : .2 ≤ p ≤ 3 and .2a = b + 1 and .rm + rn ≥ 2p. Note that .νp m+n can be evaluated using the Kummer rule for Lucasn U nomials as .p Q . Concrete examples of calculations using Theorem 85 can be found in [15, Sect. 3].
5.6.2 A Generalized Legendre Formula We provide a generalization to Lucas factorials .n!U of the Legendre formula
138
5 Some Properties of Lucasnomials
ν (n!) =
m
. p
k≥1
pk
=
n − sp (n) , p−1
(5.54)
where .sp (n) is the sum of the p-ary digits of n. Theorem 86 Let .p Q be a prime. If .p = 2, we assume additionally that P is even or .Q ≡ 1 (mod 4). Suppose p has rank .ρ and rank exponent .ν in U ; then, for all .n ≥ 1, we have n p n/ρ − sp ( n/ρ ) n , .νp (n!U ) = (5.55) = (ν − 1) + ρ p−1 ρk k≥1
where .ρk is the rank of .pk in U and .sp is the base-p sum-of-digit function. Proof Suppose .n = a p−1 ρ+· · ·+a1 ρ+a0 , where .0 ≤ a0 < ρ and .0 ≤ ai < p for .i ≥ 1. Then, as seen at the beginning of the proof of Theorem 82, n n .νp (n!U ) = ν + ρ ρpk k≥1 n n = (ν − 1) . + ρ ρpk k≥0
But, as .n/ρpk =
−1 i=k
ai+1 pi−k , we find that
−1 −1 n ai+1 pi−k . = ρpk k=0 i=k
k≥0
=
−1
ai+1
i=0
=
−1 i=0
i
pi−k =
k=0
ai+1
p
−1 i=0
ai+1
i
pu
u=0
1 −1 = pn/ρ − sp n/ρ , p−1 p−1
i+1
which proves the result.
.
Note that if .U = U (2, 1), then for all primes p, we get .ρ = p and .ν = 1.
Moreover, if .n = i=0 ai pi , then .pn/ρ = n−a0 and .sp (n/ρ ) = sp (n)−a0 . Hence, if we apply (5.55) to .U (2, 1), we recover (5.54). If .p = 2, P is odd, and .Q ≡ −1 (mod 4), then .c = ν2 (P 2 − 3Q) ≥ 2, and, as observed in Remark 16, the law of repetition applies not from .ρ = 3, but from .pρ = 6. That is, .ν2 (U6n ) = ν2 (U6 ) + ν2 (n) and .ν2 (U6 ) − ν2 (U3 ) = c > 1. As seen at the end of the proof of Theorem 82, we have n n n .ν2 (n!U ) = ν . + + (c − 1) 6 6 · 2k 3 k≥0
5.6 The p-Adic Valuation of Lucasnomials
139
Since P is odd and .Q ≡ −1 (mod 4), .U3 = P 2 − Q ≡ 2 (mod 4) so that
−2 −1 .ν = 1. If .n = a0 + a1 3 + a2 6 + a3 12 + · · · + a 3 · 2 , then . k=0 n/(6 · 2k ) =
−2 −2 i−k . Inverting the order of summation as we did in the proof k=0 i=k ai+2 2 of Theorem 86, we obtain the following complement to Theorem 86, namely, the equation n n .ν2 (n!U ) = + (c − 1) + n/3 − s2 n/3 3 6 n n n =2× (5.56) + (c − 1) − s2 . 3 6 3 For example, using (5.56) for .F = U (1, −1), we find that .c = 2 and ν (100!F ) = 2 × 33 + 1 × 16 − s2 (32 + 1) = 66 + 16 − 2 = 80.
. 2
Remark 34 The two formulas (5.55) and (5.56) should coincide if .p = 2, P is odd, and .Q ≡ 1 (mod 4). In this case, because .c = 1, both analyses are valid provided we take into account that .ν = ν2 (P 2 − Q) ≥ 2. Thus, they coincide if we replace the coefficient of .n/3 by .ν + 1 instead of 2 in (5.56). Remark 35 If for the Fibonacci sequence, the generalized Legendre formula (5.56) yields .ν2 (n!F ) = 2n/3 + n/6 − s2 (n/3 ), Phunphayap and Pongsriiam [67, eq. (9)] obtained another expression by a direct calculation based on the 2-adic valuation of Fibonacci terms, namely, ν (n!F ) = (n + 3)/6 + 3n/6 + ν2 (n/6 !).
. 2
5.6.3 Explicit Valuations As seen in Example 83, calculating the valuation of a Lucasnomial can be done directly or by using the Kummer rule for Lucasnomials. Several papers [58–61, 67, 68] have studied the p-adic valuation of some Fibonomial coefficients in a direct manner. We note in passing that, using similar methods, results for general Lucasnomials can surely be achieved. The paper [11] used the Kummer rule (Theorem 82) to improve upon Fibonomial results of the papers [58–61], but also included valuation theorems for general Lucasnomials. The proofs were often much shorter. However, the papers [67, 68] established the p-adic valuation of larger collections of Fibonomials than in any preceding papers using direct elementary methods. = p pn−1 For .n ≥ 1 an integer and p a prime, we have . pn . Hence, p n n−1 pn sn divides . n for all .n ≥ 1. It is easy to see that .p | n for all .n ≥ 1 if and only
140
5 Some Properties of Lucasnomials
if .p | s. Marques et al., who initiated these studies, posed two corresponding Fibonomial questions: 1. Given a prime p, when does p divide . pn n F? 2. What necessary and sufficient condition must s satisfy in order for p to divide all Fibonomials of the type . sn n F? In [58], the authors proved that .2 | 2n n F iff .n ≥ 2. It is re-proved in a few lines in [11, Thm 3.1] using the Kummer rule. For .p = 2, the answer to 2 is that .6 | s. The case .p = 3 is solved in [59]. The prime 3 divides Question 3n k . iff .n ≥ 2 and .n = 2 · 3 , (.k ≥ 0). The set of exceptions is slim and n F is made to appear naturally by using the Kummer rule in a short proof [11, Thm. 1.1]. As for Question 2, s must be divisible by 12 [59, Thm. 2]. The m case m .p = 5 is peculiar since .ν5 (Fn ) = ν5 (n) for all .n ≥ 1. Thus, . n and . n F have the same 5-valuation. In particular, Question 1 has an affirmative answer for all .n ≥ 1. The use of the Kummer rule was tested on the case .p = 7 in [11, Thm. 3.6], but the proof was notably longer. Although the set of integers n for which .7 7n n F was explicitly described, it necessitated three parameters. Instead of going further along this method, it was shown that, s x), given a prime p, the set of integers .n ≤ x for which .p pn n F is .O(log pn where s is a nonnegative integer .≤ p − 2. In other words, divisibility of . n F by p occurs on a set of asymptotic density 1. The remark was made that the same result holds if F is replaced by any Lucas sequence U . Marques a found that if .p ≡ ±2 (mod 5), then et al. [61]took .n = p , (.a ≥ 1), andpn pn p divides . n F ; they conjectured .p n F whenever .p ≡ ±1 (mod 5). The conjecture was proved in [60], but also in [11, Thm. 2.1] with a short proof that used the Kummer rule. In [60], the authors also found the exact valuation of pa+1 . pa F for .p ≡ ±2 (mod 5). (Their result is only accurate for primes whose rank exponent is 1 or for even exponents a.) Theorem 7.1 of [11] gave the b for all .U = U (P, Q) complete p-adic valuation of the Lucasnomials . ppa U and all primes .p Q, .0 ≤ a < b. This was done using the Kummer rule for Lucasnomials. Question 2 was addressed not only for the case but Fibonacci for all .n ≥ 1 iff for any Lucas sequence U in [11, Thm. 6.1]: p divides . sn n U 2 .lcm(p, ρ) | s, where .ρ is the rank of p in U . Thus, if .p D = P − 4Q, then the condition on s is that .pρ divides s. Phunphayap and Pongsriiam [67] managed by direct elementary methods to find explicit p-adic valuation formulas for all Fibonomials of the form 1 pb . 2 pa F , where .b ≥ a ≥ 1 and .1 and .2 are positive integers. Assume b a .1 p > 2 p , and define s and r as the respective remainders of the Euclidean divisions of .1 pb and .2 pa by .ρ, the rank of p. Theorem 13 of [67] gives for primes .p ≡ ±2 (mod 5) six separate formulas depending on the relative sizes of r and s and on the divisibility of .1 and .2 by .ρ. But for primes .p ≡ ±1 (mod 5), they find a single formula, which we give here
5.7 Lucas’ Congruence
ν
. p
1 pb 2 pa
141
= νp F
m + [r < s] · a + ν + νp (m − k) , k
(5.57)
b−a
where .m = 1 pρ , .k = ρ2 , and .ν is the rank exponent of p in F . It was shown [11, Thm. 7.1] that the p-adic valuation of a Lucasnomial of the shape pb . a p U , (.b ≥ a ≥ 0), is 0 if .ρ | p − 1 (and, incidentally, if .b ≡ a (mod 2), when .ρ | p + 1). Suppose .U = F , .p ≡ ±1 (mod 5), and .0 < a < b. Then a b .ρ | p − 1 by Theorem 9. Thus, .ρ divides .p − 1 and .p − 1. Hence, .r = s = 1. Choosing .1 = 2 = 1, we see that .k = 0. Therefore, we indeed recover from b Equation (5.57) the fact that .νp ppa = 0. Actually, we see from (5.57) that, F b for .p ≡ ±1 (mod 5), .νp p = 0 ( . 0 < a < b) as soon as .ρ . Indeed, .ρ pa F implies .r ≥ 1 = s. Moreover, with .2 = 1, we obtain .k = 0. In [68], given any prime p, the same two authors find formulas for the a p-adic valuation of the Fibonomials . pnn F , where .a ≥ 1 is an integer. As an example, for .p ≡ ±2 (mod 5), .p = 2, a even, this valuation is .
a A − · [s = 0] − νp (A!), p−1 2
where .s = (n (mod ρ)), .A = m(pa − 1)/ρ , and .m = n/pνp (n) . In some a corollaries of their results, they are paable to determine, given some .p , the set n of integers n for which p divides . n F , a problem which extends Question 3 1. For instance, they find that . 2nn F is odd if and only if n is of the form k .(1 + 6 · 8 )/7, .k ≥ 0. Knowing the p-adic valuation of a Lucasnomial is zero should not prevent us from finding its residues modulo powers of p. (See in particular Sect. 5.8). In [29], the authors prove a result for specific Fibonomials, namely a+1 p . ≡ 1 + p + p2 (mod p3 ), pa F for all primes .p ≡ ±1 (mod 5) whose rank in the Fibonacci sequence is .p − 1 and all .a ≥ 3.
5.7 Lucas’ Congruence Let p be a prime and .B = (bi,j )0≤i,j≤p−1 be the .p × p matrix of binomial coefficient .bi,j = ( ji (mod p)). For instance, if .p = 3, then 100 B = 110 121
.
142
5 Some Properties of Lucasnomials
Then the first 4p lines of Pascal’s triangle modulo p are B B B
.
B (2B) B B (3B) (3B) B ... where multiplication is taken modulo p. In his classical memoir on Lucas sequences [56, p. 229], Lucas showed how constructing the Pascal triangle modulo a prime p lets the initial first p lines reappear further down the triangle but flanked with binomial coefficients and deduced from this structure the now-famous congruence for binomial coefficients modulo p. Theorem 87 If p is a prime number and m and n are two nonnegative integers, then Lucas’ congruence m mi . ≡ (mod p) n ni i≥0
holds, where .0 ≤ mi , ni < p are the ith p-ary digits of m and n (see Sect. 5.6.1). Meˇstrovi´c wrote a thorough compendium [63] of the various proofs, extensions, and applications of Lucas’ theorem that appeared in the literature up until 2014. Section 5 of [63] is dedicated to the generalizations of Lucas’ theorem which have to do with generalized binomial coefficients, including Lucasnomials. These days, the short formal proof of Lucas’ theorem given by Fine [26] is perhaps the most often reproduced. It appears on the Wikipedia page on Lucas’ theorem or on page 6 of Meˇstrovi´c’s paper [63]. It is often noted that if mp + s m s . (5.58) ≡ (mod p), np + t n t where m, n, s, and t are nonnegative integers with s and t less than p, then Theorem 87 holds. Thus, we may also prove Lucas’ congruence by noting that m mp+s .(1 + x) = (1 + x)p (1 + x)s ≡ (1 + xp )m (1 + x)s (mod p). Thus, if .[xk ]f (x) denotes the coefficient of .xk in the polynomial .f (x), because s and t are less than p, we see that
5.7 Lucas’ Congruence
143
[xnp+t ](1 + x)mp+s ≡ [xnp ](1 + xp )m · [xt ](1 + x)s m s = (mod p). n t
.
Hence, (5.58) follows. There are generalizations of Lucas’ theorem—e.g., modulo higher powers of primes—which may themselves admit extensions to Lucasnomials. In this section, we limit ourselves to some of the attempts at generalizing the Lucas congruence (as it is) to Lucasnomials. Our material overlaps much of Meˇstrovi´c’s [63, Sect. 5]. However, the presentation differs, a more uniform notation is used, some post-2014 references are cited, and a few remarks and improvements on existing results have been added. As usual, historically, the first attempts started with q-binomial coefficients and Fibonomials. In 1965, Olive [65] obtained the polynomial congruence m s md + s . ≡ (mod Φd (q)), (5.59) n t q nd + t q which is a q-analogue of (5.58), where d is a positive integer and .Φd (q) the dth cyclotomic polynomial (mentioned in Sects. 3.5 and 4.3). Note that if d is a prime p, then the irreducible polynomial .Φp (q) is the usual q-analogue of the rational prime p. Also if .d = p, we recover (5.58) by letting q tend to 1. Thus, (5.59) is a true generalization of Lucas’ congruence. As with many Gaussian coefficient congruences, their consequences and applications in terms of Lucas sequences await examination. In 1967, Fray [27, Thm. 3.11] gave the following generalization of (5.58): m s mρ + s . ≡ (mod p), (5.60) n t q nρ + t q where q was viewed as a p-integral rational number, i.e., a rational number with both numerator and denominator prime to p, .ρ is the order of q modulo p, and m, n, s, and t are nonnegative integers with s and t .< ρ. nThe Fibonomial triangle is obtained by replacing n the binomial coefficient . in Pascal’s triangle with the Fibonomial . k k F . Interest in the Fibonomial triangle modulo primes began in the 1960s (see for instance [37]) and flourished in the 1990s [23, 24, 38, 74, 82, 83], often with the intention of discovering an analogue of Lucas’ theorem. This study was frequently limited to the primes 2, 3, or 7 or to primes p satisfying some particular condition. However, Wilson [83], on the one hand, and Wells [82] and Holte [38], on the other, found analogues of (5.58) that worked for general primes. Wilson showed that for a prime p not 2, nor 5, we have m s mρ + s . ≡ Fe (mod p), (5.61) n t F ρ+1 nρ + t F where .e = (nρ + t)(m − n) + n(s − t).
144
5 Some Properties of Lucasnomials
In 2001, Hu and Sun [41] found a general Lucasnomial extension of Lucas’ theorem that subsumes several of the previous results, in particular the qanalogue (5.60) of Fray and the Fibonomial analogue of Wilson (5.61). Theorem 88 Suppose .U (P, Q) is a regular and nondegenerate Lucas sequence. If q is a positive integer, then m s mq + s . ≡ Ue (mod Pq ), (5.62) n t U q+1 nq + t U where m, n, s, and t are nonnegative integers, s and t are less than q, e is (nq+t)(m−n)+n(s−t), and .Pq is the largest primitive factor of .Uq . If q or e is e in (5.62) can be replaced by .(−1)(mt−ns)(q−1) Qeq/2 . even, then the factor .Uq+1
.
One easily checks that mt − sn, .e ≡ mt − sn + n(m − n),
if q is even; if q is odd;
(mod 2).
(5.63)
By Corollary 39, requiring that .U (P, Q) be nondegenerate when P and Q are coprime comes down to discarding the two sequences .U (±1, 1). If .(P, Q) = (2, 1) and q is a prime, then .Pq = Uq = q and .Uq+1 = q + 1 ≡ 1 (mod q). This shows that (5.62) is indeed a generalization of (5.58). It clearly extends the result of Wilson, since taking .U = F and .q = ρ, we have .p | Pq . To see that it generalizes (5.60), assume q is a p-integral rational number of order .ρ modulo p. Then we find that .
q ρ+1 − q ρ + q ρ − 1 q ρ+1 − 1 qρ − 1 = qρ + ≡ 1 + 0 = 1 (mod p). = q−1 q−1 q−1
e Hence, .Uρ+1 ≡ 1 (mod p).
If p is a primitive prime factor of .Uq , then (5.62) holds modulo .pν since the rank .ρ of p is q and .ν is the rank exponent of p. Hence, for all primes .p Q, we find that m s mρ + s . ≡ Ue (mod pν ). (5.64) n t U ρ+1 nρ + t U Since .2Uρ+1 = Uρ V1 + U1 Vρ , we see that, for p odd, we also have m s mρ + s . ≡ (Vρ /2)e (mod pν ). n t U nρ + t U
(5.65)
Remark 36 The congruences (5.64) and (5.65) hold without the hypothesis of Theorem 88 that U be regular. (The proof of Theorem 88 requires in [41, Lemma 4] that .Uq and .Uq+1 be coprime. However, if .p Q, then we know by
5.7 Lucas’ Congruence
145
Lemma 7 that .p gcd(Uq , Uq+1 ), which suffices for the congruence to hold modulo p, or .pν , when .q = ρ(p).) Congruence (5.58) is equivalent to Lucas’ theorem, but the existence of Lucasnomial generalizations of this congruence does not usually imply the wishful generalization of Lucas’ theorem: mi m . ≡ (mod p), (5.66) n U ni U i≥0
where the .mi and .ni are the digits of m and n in the mixed base described in Remark 32. For instance, the Fibonomial . 51 F = F5 = 5 ≡ 2 (mod 3), but as .ρF (3) = 4, we have .5 = 1 · ρ + 1, .1 = 0 · ρ + 1, and . 10 F 11 F = 1. However, in this regard, we do have a couple of corollaries to Theorem 88. Corollary 89 Let .U (P, Q) be a fundamental Lucas sequence, and let .p Q be a prime of rank .ρ in U . Then, for all m and n nonnegative integers, we have mi m0 m .p divides ⇐⇒ p divides , · n U ni n0 U i≥1
where .(mi )i≥0 and .(ni )i≥0 are the respective digits of m and n in the mixed . base .(1, ρ, pρ, . . . , pi ρ, . . .). Proof By (5.64), we have m/ρ m0 m . ≡ Ue n/ρ n U n0 U ρ+1
(mod p).
By Lucas’ theorem, .
m/ρ n/ρ
≡
mi i≥1
ni
(mod p).
The corollary follows because, by Lemma 7, .p Uρ+1 since .p | Uρ .
.
From Corollary 89, we easily deduce the following result. Corollary 90 Let .U (P, Q) be a fundamental Lucas sequence and .p Q a prime of rank .ρ ≥ p. Then, for all m and n nonnegative integers, we have mi m .p divides ⇐⇒ p divides , n U ni U i≥0
where .(mi )i≥0 and .(ni )i≥0 are the respective digits of m and n in the mixed . base .(1, ρ, pρ, . . . , pi ρ, . . .).
146
5 Some Properties of Lucasnomials
i Proof By Corollary 89, it suffices to check that for each .i ≥ 1, .p | m m i mi ni iff .p | ni U . But, for .i ≥ 1, we have .0 ≤ mi , ni < p. Thus, .p | ni iff m i .mi < ni . By the Kummer rule for Lucasnomials (Theorem 82), .p | ni U iff either .mi < ni , or .mi ≥ ni and .{(mi − ni )/ρ} + {ni /ρ} ≥ 1. But the latter condition holds iff .mi /ρ − (mi − ni )/ρ − ni /ρ = 1 and that cannot . happen since .ρ ≥ p entails that each of the three integral parts is zero. We observe that Corollaries 89 and 90 imply the naive version of Lucas’ theorem (5.66) for .p = 2, since the rank of 2 in U is either 2 or 3. Thus, if Q is odd, then mi m . ≡ (mod 2), (5.67) n U ni U i≥0
where as before the .mi and .ni are the digits of m and n in the mixed base (1, ρ, 2ρ, . . . , 2i ρ, . . .). i implies In the proof of Corollary 90, we saw that for .i ≥ 1, .p | m ni m i .p | . This implication holds even if .ρ < p. Thus, with Corollary 89, we ni U i
see that the divisibility of . i≥1 m ni U by p is a necessary condition for p to m divide . n U . That is, we at least have the following result: .
Corollary 91 Let .U (P, Q) be a fundamental Lucas sequence and .p Q be a prime of rank .ρ. Then, for all m and n nonnegative integers, we have mi m .p divides =⇒ p divides , n U ni U i≥0
where .(mi )i≥0 and .(ni )i≥0 are the respective digits of m and n in the mixed . base .(1, ρ, pρ, . . . , pi ρ, . . .). The congruence (5.67) appeared in the 2014 paper [23] as Theorem 3.4 at least when U is the Fibonacci sequence. The authors checked the congruence via a case-by-case use of the Kummer rule for Fibonomials. In 2016, Southwick [74] conjectured Corollary 90 again in the context of the Fibonacci sequence. In 2018, Debellevue and Kryuchkova [24] worked out a direct proof of Southwick’s conjecture using the Kummer rule for Fibonomials; i.e., they did not see it as a consequence of Theorem 88. Their main theorem, [24, Thm. 4.6], states that if p is an odd prime of rank .ρ = p + 1 in the Fibonacci sequence, then a m s mp ρ + s . ≡ (−1)mt−sn (mod p), (5.68) a n t F np ρ + t F where .a ≥ 0, .0 < s < pa ρ, .0 ≤ t < pa ρ, and .0 ≤ m, n < p. This congruence has nice consequences for the structure of the Fibonomial triangle modulo such a prime, since blocks of size .pa ρ reappear flanked by binomial coefficients further down the triangle just as Lucas discovered they did in the case of the
5.7 Lucas’ Congruence
147
Pascal triangle, only up to a possible .−1 factor this time. With sharp eyes or a magnifying glass, one can see the Fibonomial triangle modulo 7 in [24, Fig. 1]. We provide next a theorem which shows that the same phenomenon holds in broader generality. Theorem 92 Suppose .U (P, Q) is a fundamental Lucas sequence with .Q = ±1 and p is an odd prime whose rank .ρ is even (.ρ = 2ρV ). Assume a, m, n, s, and t are nonnegative integers with s and t less than .pa ρ. Then a m s mp ρ + s . ≡ m,n,s,t (mod p). a n t U np ρ + t U
where
. m,n,s,t
=
(−1)mt−sn , 1,
if 4 | ρ or Q = 1; if 2 || ρ and Q = −1.
Proof Suppose first .Q = −1. Note that when applying Theorem 88 to the with .q = ρ, we may, since .Q = −1 and .ρ is even, Lucasnomial . mq+s nq+t U
e by .(−1)mt−sn (−1)eρV = (−1)(mt−sn)(1+ρV ) . Write using (5.63), replace .Uρ+1 .s = s ρ + s0 and .t = t ρ + t0 , where .0 ≤ s0 , t0 < ρ. Using Hu and Sun’s theorem with .q = ρ a couple of times and Lucas’ theorem, we find that a a (mpa + s )ρ + s0 mp + s mp ρ + s s0 . = ≡ (−1)x a a a (np + t )ρ + t0 U np + t t0 U np ρ + t U m s m s ρ + s0 s0 x ≡ (−1) ≡ (−1)x+y n n t t0 U t ρ + t0 U m s = (−1)x+y (mod p), n t U
where x = ((m + s )t0 − s0 (n + t ))(1 + ρV )
.
y = (s t0 − s0 t )(1 + ρV ). Hence,
.
x + y = (m + s )t0 − s0 (n + t ) + (s t0 − s0 t ) 1 + ρV ≡ (mt0 − s0 n)(1 + ρV ) ≡ (mt − sn)(1 + ρV ) (mod 2),
where the justification for the latter congruence is that, .ρ being even, .t ≡ t0 (mod 2) and .s ≡ s0 (mod 2). Thus, (−1)mt−sn , if 4 | ρ; x+y .(−1) = 1, if 2 || ρ.
148
5 Some Properties of Lucasnomials
e If .Q = 1 and .ρ is even, then .Uρ+1 is replaceable by .(−1)mt−sn in Theorem 88. x+y is identical to the case .Q = −1 and .4 | ρ. . Thus, our calculation of .(−1)
Remark 37 For .U = F , the case of an odd prime p of rank .ρ = p + 1 (i.e., congruence (5.68)) is a subcase of “.4 | ρ” in Theorem 92. Indeed, by Theorem 36, we must have .(Q | p) = −1. Thus, since .Q = −1, we have .p ≡ 3 (mod 4). Hence, .4 | p + 1. Note also that, by Lemma 15, .Vp+1 ≡ 2Q (mod p). For these primes, we also recover (5.68) from (5.65). When Theorem 92 is applicable, it provides a very effective way of computing a Lucasnomial modulo p. In fact, we get the following corollary which is very close to Lucas’ theorem. Corollary 93 Suppose .U (P, Q) is a fundamental Lucas sequence with .Q = ±1 and p is an odd prime with even rank .ρ. Assume m, n, and a are nonnegative integers with .a ≥ 1, .m = s0 + s1 ρ + s2 pρ + · · · + sa pa−1 ρ, and a−1 .n = t0 + t1 ρ + t2 pρ + · · · + ta p ρ, where .0 ≤ s0 , t0 < ρ and .0 ≤ si , ti < p for all .1 ≤ i < a. Then a−1 si s0 m ≡ m,n · n U ti t0 U i=1
(mod p),
.
where
. m,n
=
(−1) m/ρ t0 −s0 n/ρ = (−1)t0 1,
i≥1
si −s0
i≥1 ti
,
Proof By Theorem 92, we obtain m/ρ ρ + s0 m/ρ s0 m . = ≡ m,n n/ρ n U n/ρ ρ + t0 U t0 U
if 4 | ρ or Q = 1; if 2 || ρ and Q = −1.
(mod p),
and the result follows by applying Lucas’ theorem to the binomial coefficient m/ρ
. . n/ρ
.
Remark 38 The Lucasnomial triangle modulo p is easiest to construct when Q = −1 and .2 || ρ. The initial triangle made of the first .ρ lines, from 0 to .ρ−1, .. . . , n is repeated in the successive next blocks of .ρ lines twice, three times, times, where the kth copy in the nth block is multiplied by . nk (mod p). Thus, once the initial triangle of .ρ lines is built, the construction is similar and as convenient as for our ordinary Pascal triangle.
.
Example 94 (Of the use of Corollary 93 to compute some Lucasnomials modulo p) 1. If .U = F = U (1, −1), .p = 11, then .ρ = 10 and .2 || ρ. Say .m = 252 and .n = 131. Then
5.7 Lucas’ Congruence
149
252 = 2 × 110 + 3 × 10 + 1 × 2, 131 = 1 × 110 + 2 × 10 + 1 × 1.
.
Hence, the mixed-base digits .(s2 , s1 , s0 ) are .(2, 3, 2) and .(t2 , t1 , t0 ) = (1, 2, 1). Thus, the Fibonomial modulo 11 is given by Corollary 93 as s2 s1 s0 252 . ≡ = 2 · 3 · 1 = 6 (mod 11). 131 F t2 t1 t0 F 2. If .U = P = U (2, −1), the sequence of Pell numbers and .p = 3, then .ρ = 4. Hence, 1 1 2 50 . ≡ (−1)1×(1+1)−2×(1+0) = 1 · 1 · 2 · 1 = 2 (mod 3), 0 1 1 P 13 P since .50/4 = 1 · 9 + 1 · 3, .s0 = 2, .13/4 = 1 · 3 and .t0 = 1.
.
We end the section by giving a few related theorems from the literature. Holte [39, Thm. 3] obtained the following curious, somewhat “Lucas-like” theorem, where .T = T (p) is the least period of .Un modulo p. This theorem also allows for the computing of a Lucasnomial modulo a prime. Theorem 95 Suppose .p Q is a prime, m and n are nonnegative integers, and .λ is the maximum of 0 and .rT (m)/ρ + rT (n)/ρ − (p − 1). Then .
m+n n
≡ U
−1 m/ρ + n/ρ rT (m)/ρ + rT (n)/ρ + λM × n/ρ rT (n)/ρ + λM rT (m) + rT (n) + λT (mod p), rT (n) + λT U
where .ρ = ρ(p), .T = T (p), .rT (x) is the remainder in the division of x by T , and .M = T /ρ is the multiplier. Remark 39 The multiplier .M = M (p) for the Fibonacci sequence can only be 1, 2 or 4 (with equal frequency, i.e., each value of M occurs for a set of primes whose natural density is .1/3 [6, Thm. 5.1]; see Chap. 9 for prime density questions). This allows for a simpler expression of Holte’s theorem when .U = F . Corollary 96 Suppose .p = 5 is a prime and m and n are nonnegative integers. Then .
−1 m/ρ + n/ρ rT (m)/ρ + rT (n)/ρ m+n ≡ × n/ρ n rT (n)/ρ F rT (m) + rT (n) (mod p), rT (n) F
150
5 Some Properties of Lucasnomials
where .ρ = ρ(p), .T = T (p), and .rT (x) is the remainder in the division of x by T . Moreover, if .2 || ρ, then m/ρ + n/ρ rT (m) + rT (n) m+n . ≡ (mod p). (5.69) n/ρ n rT (n) F F Proof By [6, Thm. 5.1] or [78], for .p = 5 a prime, we find that M (p) = 1 ⇐⇒ 2 || ρ or p = 2,
.
M (p) = 2 ⇐⇒ 4 | ρ, M (p) = 4 ⇐⇒ ρ is odd and p = 2. If .M = 1, then .rT (x) < T = ρ so that .λ = 0. If .M = 2, then .rT (x) < T = 2ρ. Hence, .rT (m)/ρ + rT (n)/ρ ≤ 2, and since .p − 1 ≥ 2, .λ = 0 again. If .M = 4, then .rT (m)/ρ + rT (n)/ρ ≤ 3 + 3. But the least prime .p = 5 for which .M = 4 is .p = 13 of rank 7. Since .13 − 1 > 6, we see that .λ = 0 once more. If .2 || ρ, then .rT (x) = 0 for all integers .x ≥ 0 so the middle term on −1 the RHS of the corollary is . 00 . This explains (5.69). . Example 97 For the sake of comparison, we apply Corollary 96 to the same Fibonomial . 252 131 F and the same prime .p = 11 as used in Example 94. Since .
252 131
= F
252 121
= F
131 + 121 121
, F
let us put .m = 131 and .n = 121. Since .ρF (11) = 10, we have .2 || ρ, consequently, by the results in [6], .M = 1. (Indeed, .F11 = 89 ≡ 1 (mod 11).) Thus, .rT (m) = rT (n) = 1. By (5.69) and Lucas’ theorem, we get 13 + 12 2 2 · 11 + 3 131 + 121 . ≡ = ·1 12 1 F 1 · 11 + 1 121 F 2 3 ≡ = 2 × 3 = 6 (mod 11), 1 1 in agreement with our previous calculation.
.
In 2002, Hu [40] published a result similar to Theorem 88, but for generalized binomial coefficients with respect to companion Lucas sequences V , namely, Theorem 98 Suppose .U (P, Q) is a regular and nondegenerate Lucas sequence. If q is a positive integer, then m s m/2 mq + s . ≡ (−Qq )f (mod Vq∗ ), (5.70) n t V n/2 nq + t V
5.8 Wolstenholme’s Congruence
151
where m, n, s, and t are nonnegative integers, m and n are even, s and t are less than q, f is .(nq + t)(m − n)/2 + n(s − t)/2, and .Vq∗ is the largest factor of .Vq prime to .V0 V1 · · · Vq−1 .
5.8 Wolstenholme’s Congruence In 1862, Wolstenholme [84] made a remarkable discovery: if .p ≥ 5 is a prime number, then the binomial coefficient . 2p−1 is congruent to 1 modulo the p−1 cube of p. That is, 2p − 1 . (5.71) ≡ 1 (mod p3 ). p−1 It had been observed by Babbage [4] in 1819 that congruence (5.71) held modulo .p2 for .p ≥ 3 since .
2p p
p p 2 p p p p p ≡ + = 2 (mod p2 ). = = 0 p k p−k k k=0
k=0
Hence, dividing each side of the above congruence by 2 yields that . 2p−1 p−1 ≡ 1 (mod p2 ). Wolstenholme, in finding (5.71), got the intermediary interesting congruence for the harmonic number .Hp−1 , also valid for .p ≥ 5: Hp−1 = 1 +
.
1 1 1 ≡0 + + ··· + p−1 2 3
(mod p2 ).
(5.72)
(In [42, p. 93], the authors mentioned a remark of Rao who pointed out that congruence (5.72) and some of its extensions had been anticipated by Waring in 1782. Thus, Babbage could have discovered Wolstenholme’s improved congruence.) Deriving (5.71) from (5.72) only requires a few steps. Indeed,
2p − 1 p−1
.
p−1 1 (p + i) = (p − 1)! i=1 ≡ 1 + pHp−1 + p2
≡ 1 + p2
1 ij 0