Professional Documents
Culture Documents
Integer Sequences Divisibility Lucas and Lehmer Sequences Masum Billal Samin Riasat Online Ebook Texxtbook Full Chapter PDF
Integer Sequences Divisibility Lucas and Lehmer Sequences Masum Billal Samin Riasat Online Ebook Texxtbook Full Chapter PDF
https://ebookmeta.com/product/integer-sequences-divisibility-
lucas-and-lehmer-sequences-1st-edition-masum-billal/
https://ebookmeta.com/product/theory-of-infinite-sequences-and-
series-1st-edition-andrei-bourchtein/
https://ebookmeta.com/product/function-and-evolution-of-repeated-
dna-sequences-1st-edition-guy-franck-richard/
https://ebookmeta.com/product/bioinformatic-and-statistical-
analysis-of-microbiome-data-from-raw-sequences-to-advanced-
modeling-with-qiime-2-and-r-yinglin-xia/
Bioinformatic and Statistical Analysis of Microbiome
Data From Raw Sequences to Advanced Modeling with QIIME
2 and R Yinglin Xia Jun Sun
https://ebookmeta.com/product/bioinformatic-and-statistical-
analysis-of-microbiome-data-from-raw-sequences-to-advanced-
modeling-with-qiime-2-and-r-yinglin-xia-jun-sun/
https://ebookmeta.com/product/the-prevention-and-management-of-
violence-2nd-edition-masum-khwaja/
https://ebookmeta.com/product/integer-optimization-and-its-
computation-in-emergency-management-1st-edition-zhengtian-wu/
https://ebookmeta.com/product/fuzzy-data-matching-with-sql-
enhancing-data-quality-and-query-performance-1st-edition-jim-
lehmer/
Masum Billal
Samin Riasat
Integer
Sequences
Divisibility, Lucas and Lehmer Sequences
Integer Sequences
Masum Billal · Samin Riasat
Integer Sequences
Divisibility, Lucas and Lehmer Sequences
Masum Billal Samin Riasat
Dhaka, Bangladesh Toronto, ON, Canada
© The Editor(s) (if applicable) and The Author(s), under exclusive license to Springer Nature
Singapore Pte Ltd. 2021
This work is subject to copyright. All rights are solely and exclusively licensed 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 Singapore Pte Ltd.
The registered company address is: 152 Beach Road, #21-01/04 Gateway East, Singapore 189721,
Singapore
Dedicated to Morgan Ward
Preface
It gives us great pleasure that Springer Nature is publishing this book. Our initial
purpose was to popularize the theories in this text within the mathematical olympiad
community seeing how useful they are for solving many olympiad problems.
However, we soon realized that this alone cannot be the sole purpose of the book as
it covers areas that can also be classified as research material. We hope that the book
will be able to help people on both fronts.
The Fibonacci sequence is one of the most popular topics of study in math-
ematics. Lucas sequences are a generalization of the Fibonacci sequence. In this
book, we discuss Lucas sequences and their generalizations: Lehmer sequences,
divisibility sequences, generalized binomial coefficients, and integer sequences with
exponent lifting property. Our goal is to discuss theories that can be derived using
mostly elementary means. Some notions have been borrowed from linear and abstract
algebra, but they have been kept in check. We will not be using any particular idea that
screams abstract algebra. Rather, we will use some basic notions to help develop our
theories. Most results in this book are not usually found in common number theory
texts. The theories discussed in this book are very interesting yet not as popular as
one would hope. Considering the impact and usefulness of these theories, it seems
unfortunate that theories like divisibility sequences are not part of regular studies
and olympiad mathematics.
We had a very hard time finding proper references for some topics. For example,
double modulus was found only in Venkov [2]. Fortunately, an English translation
of the book was available, see Venkov [3]. Considering that the theory of double
modulus has been known since the time of Dedekind, it is a shame that almost no
common elementary text today covers this topic. Another gem we want to mention is
the Schönemann theorems. We have yet to find proper references for Schönemann’s
theorems, especially his second theorem. The only references we could find of these
theorems are in Ward’s papers, e.g., Ward [4]. Apparently, Ward was a big fan of
these theorems and often applied them in his work. Moreover, judging by papers
of Engstrom [1] and others we are convinced they too knew these results well. For
example, Engstrom [1] uses a factorization similar to that of Schönemann’s in his
paper. But today there is no record of these results either online or in any common
books that we know of.
vii
viii Preface
References
This book is written for pretty much anybody interested in Fibonacci-like sequences.
We have tried to write the book in a way that not only undergraduates but people
with a focus on mathematical olympiads can also read the book with little effort.
As for pre-requisites, we have tried our best to keep the book self-contained and
as elementary as possible. We have even made an extra effort to use things like the
double modulus which one could argue that should be replaced by ideals. Although
we do discuss ideals as part of the prologue to the actual discussion, we have kept
the usage of anything abstract to a bare minimum and used them only if they were
absolutely necessary. The thought of writing the whole book based on elementary
methods only did cross our minds. However, writing everything from scratch and
redeveloping known theory does not really favor the subject at hand in the long run.
That being said, we used little abstract algebra most of which is only for the first
two chapters. The rest of the chapters are almost free from abstract algebra concepts.
Our purpose is to not only let an undergraduate student study these topics but also
show an olympiad-level student how useful such theory can be in many cases. For
this purpose, we have also added some exercises that appeared in various popular
mathematical contests.
ix
Contents
1 Preliminaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 Groups, Rings, Fields, and Vector Spaces . . . . . . . . . . . . . . . . . . . . . . 2
1.1.1 Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1.2 Rings and Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1.3 Vector Spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.2 Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.3 Polynomials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.4 Cyclotomic Polynomials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2 Linear Recurrent Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
2.2 Periodicity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
2.3 Fundamental Theorems on Periodicity . . . . . . . . . . . . . . . . . . . . . . . . . 39
2.4 Finding Pre-Period and Least Period . . . . . . . . . . . . . . . . . . . . . . . . . . 43
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
3 Divisibility Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
3.2 Characterization of Divisibility Sequences . . . . . . . . . . . . . . . . . . . . . 61
3.3 Binomial Coefficients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
4 Lucas Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
4.2 Divisibility of Second-Order Lucas Sequences . . . . . . . . . . . . . . . . . . 74
4.3 Lucas Sequence of Arbitrary Order . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
5 Lehmer Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
5.2 Divisibility of Lehmer Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
5.3 Periodicity of Lehmer Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
5.4 Extending Wilson’s Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
xi
xii Contents
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
About the Authors
Samin Riasat has completed his Master of Mathematics in Computer Science at the
University of Waterloo, Canada. He has authored a book on mathematical olympiads
and his research articles have been published in journals of repute. He is also a
reviewer for Mathematical Reviews.
xiii
Chapter 1
Preliminaries
In this chapter, we discuss some topics from algebra that are prerequisites to the theory
we will develop. First, we discuss groups, rings, fields, vector spaces, and matrices
very briefly in Sects. 1.1 and 1.2. Then, we discuss properties of polynomials in
Sect. 1.3 and cyclotomic polynomials in particular in Sect. 1.4. Later, we will talk
about recurrent sequences (mostly linear recurrent sequences over fields) in Chap. 2.
We will talk about divisibility sequences and explore their connections to binomial
and related sequences in Chap. 3. We will use the theory developed in these chapters
to characterize Lucas sequences in Chap. 4 and Lehmer sequences in Chap. 5. Finally,
we will discuss special divisors of such sequences, particularly primitive divisors, in
Chap. 6.
We will be using mostly elementary methods in this book. Occasionally we will
require some advanced theory. However, our use of abstract theory will be minimal,
to the point where we can even claim that it is still elementary. So a reader completely
unfamiliar with abstract algebra should not feel overwhelmed . We could probably
avoid using abstract theory altogether. For example, it is possible to only develop the
theory of cyclotomic polynomials. However, doing so would make our discussion
too restrictive and very case specific when we can obtain far more general results
with the introduction of little theory. We initially wanted to avoid going into abstract
theory altogether but soon realized that the amount of effort this will require will not
be worth it.
To be more specific, we will need some basic ideas from linear and abstract
algebra. In order to keep the book self-contained, we will discuss these topics from
a beginner’s perspective. We will be using a standard notation common to most
texts for your convenience. You can consult texts like [Lan86, LN97] but we do not
require such heavy machinery. Therefore, if you are unfamiliar with these subjects,
you may find it easier to focus on what is presented in this book alone. We suggest
you to use examples to make sense of the definitions and ideas. Then, if you feel like
you want to dig deeper you can consult other texts. For example, linear algebra will
be required mostly for the notion of a basis. And abstract algebra will be required
© The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd. 2021 1
M. Billal and S. Riasat, Integer Sequences,
https://doi.org/10.1007/978-981-16-0570-3_1
2 1 Preliminaries
for some properties of polynomials and matrices that would otherwise be difficult to
describe. You may be wondering why we might need these things in a number theory
text at all. To your surprise, you will see that recurrent sequences, polynomials, and
matrices are very much connected to one another. This will make more sense once
we develop the theories and show the connections. To give you an idea, most of
the results regarding primitive divisors in Chap. 6 will be derived using cyclotomic
polynomials.
If you are completely new to this topic, do not be afraid. As long as you are familiar
with sets, you should be able to grasp the ideas in this section. We also urge you to
try to prove as many of the facts that we state as you can.
Vector spaces are just sets with some interesting properties. But before getting
into vector space, we will discuss some more basic algebraic structures. These will
help us define and develop a lot of properties with ease. First, we will talk about
groups, rings, and fields. Then we will discuss vector spaces.
We mentioned that groups and vector spaces are just sets with interesting proper-
ties. One property that is common in all such algebraic structures is closure. We will
be talking about binary operations defined on these sets. Such an operation takes two
elements of the set as input. Now, it makes sense to be interested in the case when
the element produced is again an element of the original set. This is why we call this
property closure.
1.1.1 Groups
x ◦ (y ◦ z) = (x ◦ y) ◦ z
For example, the set Z of integers equipped with addition is a group. Observe
that 0 is the identity of Z, and −x is the inverse of x for any x ∈ Z. Note that
the set N of natural numbers is not a group under addition. Also, Z is not a group
under multiplication. The set {1, ω, ω 2 } where ω is an imaginary cubic root of unity
(ω 3 = 1) is a group under multiplication.
Note that a familiar property is missing from the list of properties of a group,
which is commutativity. If
x◦y = y◦x
for any x, y ∈ G, then G is called an abelian group. It is however true in general that
(x ◦ y)−1 = y −1 ◦ x −1 (1.1)
for any group G and x, y ∈ G. All the examples of groups we have mentioned so far
are abelian. An example of a group that is not abelian is the set of invertible matrices
under matrix multiplication. We will talk about this group near the end of Sect. 1.2.
Consider a group G with binary operation ◦. We write
x n = x ◦ ·
· · ◦ x, x 0 = e
n times
Consider a set S equipped with two operations + (called addition) and · (called
multiplication). We call S a ring if it satisfies the following properties.
(1) (Abelian Additive Group) S is an abelian group under + with identity 0.
(2) (Associativity of Multiplication) For any x, y, z ∈ S,
x · (y · z) = (x · y) · z
x · (y + z) = x · y + x · z
(y + z) · x = y · x + z · x
Note that two familiar properties are missing for multiplication: commutativity
and inverses. If S also has these properties, then S is called a field. That is, a field is
a ring with the following additional properties.
i. (Commutativity of Multiplication) For any x, y ∈ S,
x·y = y·x
As we can see, a field is simply a set with some desired properties. More generally,
the objects studied in abstract algebra are√sets with special properties. For instance,
the set of all numbers of the form a + b 2, where a, b are rational √ numbers, is a
field. Similarly, the set of numbers of the form a + bi, where i = −1 and a, b are
rational numbers, is also a field.
The non-zero elements of a field form an abelian group under multiplication. We
write F ∗ for the set of non-zero elements of the field F and call F ∗ the multiplicative
group of F. We also write x y instead of x · y for convenience.
Theorem 1.6 If F is a field, then every finite subgroup of F ∗ is cyclic.
If F, K are fields under the same operations with F a subset of K , we call F a
subfield of K . If, in addition, F = K , then we call F a proper subfield of K . A field
that has no proper subfield is called a prime field. Observe that R and Q are subfields
of C.
For a positive integer n, let Fn be the set {0, 1, 2, . . . , n − 1} of residues modulo
n. Then Fn is a ring under addition modulo n and multiplication modulo n, for any
n. Moreover, F p is a prime field for any prime p.
Let R be a ring. If there is a positive integer n such that nx = 0 for any x ∈ R,
then the least such n is called the characteristic of the ring R. If no such n exists,
then we say R has characteristic 0. For example, F p has characteristic p, while R
and C both have characteristic 0. A domain is a ring with no zero divisor; that is, if
x y = 0 then either x = 0 or y = 0. If R is a domain with a non-zero characteristic,
then the characteristic of R must be a prime number. As a result, all finite fields have
a prime characteristic.
Theorem 1.7 Let R be a commutative ring of prime characteristic p. Then for any
a, b ∈ R and integer n ≥ 0,
n n n
(a + b) p = a p + b p
Proof We prove the result for n = 1 and leave the general case as an exercise. Recall
the binomial theorem (see Binomial Theorem in the glossary),
n n−1 n
(a + b)n = a n + a b + ··· + a 1 bn−1 + bn
1 n−1
p p p−1 p
Now, since k
= k k−1
, it follows that p divides k
for 0 < k < p. Hence
p p−1 p
(a + b) = a +
p p
a b + ··· + ab p−1 + b p
1 1
= ap + bp
as desired.
Let F be a field, K a subfield of F and S a subset of F. Consider all the subfields
of F that contain both K and S. The intersection of these subfields is also a field.
6 1 Preliminaries
We call this field the extension field of K adjoining S and write it as K (S). We
call K (S) an extension of K and if S is finite, a finite extension of K . Observe that
K (S) is the smallest subfield of F that contains both K and S. For a finite S, if
S = {s1 , s2 , . . . , sk }, then we write K (S) = K (s1 , s2 , . . . , sk ). If S = {s}, then we
call K (s) a simple extension.
A set I is called an ideal of a ring R if I ⊆ R and for all x ∈ R, a ∈ I , we have
xa ∈ I . For instance, note that Z is not an ideal of Q . For the ring Z, the subset I
which is the set of all multiples of some fixed integer n is an ideal of Z. In fact, the
smallest ideal containing a particular element x ∈ R is the set {xa : a ∈ R}. We call
this the ideal generated by a. An ideal I of R is called a principal ideal if is generated
by some a ∈ I . We call I the principal ideal generated by a, and write I = (a). A
domain R is called a principal ideal domain if every ideal of R is a principal ideal.
An ideal I of a ring R is called a prime ideal if x y ∈ I only if x ∈ I or y ∈ I for all
x, y ∈ R.
We now define a vector space V over a field F, which is a set with the following
properties.
a(x + y) = ax + ay
(a + b)x = ax + bx
a(bx) = (ab)x
0x = 0
1x = x
x + y = (x1 + y1 , x2 + y2 , . . . , xn + yn )
ax = (ax1 , ax2 , . . . , axn )
1.1 Groups, Rings, Fields, and Vector Spaces 7
for a in F. Then F n satisfies the properties of a vector space over F. In this case we
just say F n is a vector space and omit the mention of the base field. For example,
Rn , Cn , Qn are all vector spaces.
Theorem 1.8 If F is an extension of K , then F is a vector space over K .
If V is a vector space over a field F, then for x1 , x2 , . . . , xn ∈ F and vec-
tors v1 , v2 , . . . , vn ∈ V , we call v1 x1 + v2 x2 + · · · + vn xn a linear combination of
v1 , v2 , . . . , vn .
Theorem 1.9 For a vector space V over F and vectors v1 , v2 , . . . , vn ∈ V , the set
of all linear combinations of v1 , v2 , . . . , vn is a subspace of V .
We call the subspace of V in Theorem 1.9 the subspace generated by v1 , v2 , . . . , vn .
Consider a vector space V over F and a set B = {v1 , v2 , . . . , vn } of vectors in V .
We say that B is linearly dependent if
a1 v1 + a2 v2 + · · · + an vn = 0
for some a1 , a2 , . . . , an ∈ F not all 0. If such elements do not exist, then we say that
B is linearly independent. So, B is linearly independent if
a1 v1 + a2 v2 + · · · + an vn = 0
v1 = (1, 0, 0, . . . , 0)
v2 = (0, 1, 0, . . . , 0)
..
.
vn = (0, 0, 0, . . . , 1)
in F n is a basis of F n .
A subset B of V is called maximally linearly independent if B is linearly inde-
pendent, but for any v ∈ V \ B, the set B ∪ {v} is linearly dependent. Likewise, a
subset B of V is called minimally spanning if B spans V , but for any b ∈ B, the set
B \ {b} does not span V .
Theorem 1.11 Let V be a vector space and B ⊆ V . Then the following are equiv-
alent.
1. B is a basis of V .
2. B is maximally linearly independent.
3. B is minimally spanning.
The dimension of a vector space V over a field F is the cardinality of a basis of
V over F, and this is well-defined.
8 1 Preliminaries
1.2 Matrices
and call A an m × n matrix over F, where m and n are the number of rows and
columns, respectively, and are called the dimensions of A. The entry in the i-th row
and the j-th column is ai, j . We can also use the shorthand A = (ai, j ), 1 ≤ i ≤ m, 1 ≤
j ≤ n to represent A.
Observe that each row and each column of A represents a vector over F. For
instance, we can express the i-th row of A as the 1 × n matrix (or row vector)
Ai, = ai,1 ai,2 · · · ai,n
which represents (ai,1 , ai,2 , . . . , ai,n ) ∈ F n . Similarly, we can express the j-th col-
umn of A as the m × 1 matrix (or column vector)
⎛ ⎞
a1, j
⎜ a2, j ⎟
⎜ ⎟
A, j = ⎜ . ⎟
⎝ .. ⎠
am, j
then
1.2 Matrices 9
⎛ ⎞
11 13 15
A + B = ⎝17 19 21⎠
23 25 27
2A = A + A
⎛ ⎞
2 4 6
= ⎝ 8 10 12⎠
14 16 18
⎛ ⎞
876
B − 2 A = ⎝5 4 3⎠
210
etc. Notice that this makes F m×n into a group under +. The identity is the zero matrix
0, defined to be the matrix with all entries equal to 0. The (additive) inverse of A
is 0 − A, which we denote simply by −A. This also allows us to define equality of
A, B ∈ F m×n as
In general, we say two matrices are equal if they have the same dimensions and
satisfy 1.2.
For c ∈ F, we define c A = (cai, j ). This defines scalar multiplication on F n×n
over F and allows F m×n to be viewed as a vector space over F.
It is also possible in some sense to define multiplication and division for matri-
ces. Traditional matrix multiplication is defined as follows. The product AB of two
matrices A and B is well-defined if and only if the number of columns of A is equal
to the number of rows of B. In particular, if A is m × n and B is p × q, then AB is
well-defined if and only if n = p. In this case, the product C = AB = (ci, j ) is the
m × q matrix given by
n
ci, j = ai,k bk, j
k=1
2x = 6 (1.3)
To solve (1.3), we divide both sides by 2 to obtain x = 3. Now, consider the system
of linear equations
2x + 3y = 5
x+y=2
It is routine to solve the system by hand. However, representing the system using
matrices as follows can give us new insight.
23 x 2x + 3y
=
11 y x+y
We can see that (1.4) resembles (1.3). In order to solve (1.4) like (1.3) we wish to
“divide” both sides of (1.4) by A. Note that this is equivalent to multiplying both
sides of (1.4) on the left by a matrix A−1 that satisfies A−1 A = I . If successful, this
would then give X = A−1 B, as desired. Such a matrix A−1 would be called the (left)
inverse of A. Unfortunately, it does not always exist.
AX = B
(A )AX = A−1 B
−1
Also note that it was important to multiply on the left because, as noted earlier, matrix
multiplication is not commutative in general.
1.2 Matrices 11
Ideally, we would like to view F m×n as a ring. For this purpose it makes sense to
consider the case m = n in particular. We call an element of F n×n a square matrix.
So a matrix is square if it has an equal number of rows and columns. Let A = (ai, j ) ∈
F n×n be a square matrix. A diagonal matrix is a square matrix with all off-diagonal
entries equal to 0. Formally, A is diagonal if ai, j = 0 whenever i = j. If A is diagonal
with ai,i = 1 for all i, then A is called the identity matrix and is denoted In , or simply
I when the context is clear. So
⎛ ⎞
1 0 0 ··· 0
⎜0 1 0 · · · 0 ⎟
⎜ ⎟
⎜ ⎟
I = ⎜0 0 1 · · · 0 ⎟
⎜ .. .. .. . . .. ⎟
⎝. . . . .⎠
0 0 0 ··· 1
With addition, multiplication, the zero matrix and the identity matrix defined as
above, F n×n becomes a ring.
It is natural to ask when the multiplication operation defined above is reversible.
A square matrix A is said to be invertible or non-singular if there is a matrix A−1 ,
called the inverse of A, such that A−1 A = A A−1 = I . Otherwise we call A singular.
An example of a singular matrix is
12
B=
24
x + 2y = 4
2x + 4y = 9
which can be seen to have no solution, in accordance with the fact that B is a singular.
We give a few more useful definitions.
Let A = (ai, j ) ∈ F m×n . The transpose of A is defined to be the matrix A T =
(a j,i ). When A = A T , we call A a symmetric matrix. When m = n, the determinant
of A is defined recursively as det(A) = a1,1 if n = 1, and if n > 1, then
n
det(A) = (−1) j−1 ai, j det(Mi, j )
j=1
then
qr pr pq
det(B) = a det − b det + c det
yz x z x y
= a(qz − r y) − b( pz − r x) + c( py − q x)
Theorem 1.14 A square matrix is invertible if and only if its determinant is non-zero.
Theorem 1.15 The determinant of a diagonal matrix is equal to the product of its
diagonal entries. In particular, a diagonal matrix with non-zero diagonal entries is
invertible.
It follows from Theorems 1.13 and 1.14 that the product of two invertible matrices
A, B ∈ F n×n is again invertible, and by (1.1) that (AB)−1 = B −1 A−1 . In particular,
the invertible matrices in F n×n form a group under matrix multiplication, called the
general linear group GLn (F). It also follows from Theorem 1.13 that the matrices in
F n×n with determinant 1 form a group under matrix multiplication, called the special
linear group SLn (F). In fact, SLn (F) is a subgroup of GLn (F). Note that neither
GLn (F) nor SLn (F) is abelian for n > 1 if F contains more than one element.
1.3 Polynomials
As before,
m we wish to define
addition and multiplication for polynomials. Write
m
f (x) = i=0 ai x i and g(x) = i=0 bi x i with f, g ∈ R[x]. Then we define f + g
and f g via
m
f (x) + g(x) = (ai + bi )x i
i=0
m+n
f (x)g(x) = ck x k where ck = ai b j
k=0 i+ j=k
0≤i≤m
0≤ j≤n
These make R[x] into a ring with 0 and 1 coming from R. Observe that if f g = 0,
then deg( f + g) ≤ max{deg( f ), deg(g)} and deg( f g) = deg( f ) + deg(g).
We will mostly consider polynomials over fields. The reason being if F is a field,
then F[x] is a principal ideal domain. Consequently, we have a division algorithm for
polynomials over a field. Henceforth, we write a | b (resp. a b) to mean a divides
(resp. does not divide) b.
Proof By Theorem 1.16, there exist q ∈ F[x] and r ∈ F such that f (x) = (x −
α)q(x) + r . Substituting α for x gives f (α) = r , as desired.
Theorem 1.20 (Factor Theorem) Let F be a field with f ∈ F[x] and α ∈ F. Then
x − α divides f if and only if f (α) = 0.
If α is a root of f , then the largest positive integer k for which (x − α)k divides
f is called the multiplicity of α. If k > 1, then we say that α is a multiple root. If
f does not have a multiple root, then f is said to be square-free. Observe that a
polynomial f in F[x] can have at most deg( f ) roots in F. Observe also that x − α
for any α ∈ F is irreducible and square-free.
Let f (x) = ak x k + · · · + a1 x + a0 ∈ F[x]. The derivative of f is the polynomial
Theorem 1.21 Let F be a field and f ∈ F[x]. If f = c f 1e1 f 2e2 · · · f mem with c ∈ F
and the f i distinct monic irreducible polynomials in F[x], then
m
f = a f 1e1 −1 f 2e2 −1 · · · f mem −1 ei f 1 f 2 · · · f i−1 f i+1 · · · f m
i=1
Since f 1e1 −1 f 2e2 −1 · · · f mem −1 divides both f and f , it follows immediately from
Theorem 1.21 that α is a multiple root of f if and only if α is also a root of f . In
particular, we have the following.
Theorem 1.22 Let F be a field and f ∈ F[x]. Then f is square-free if and only if
gcd( f, f ) = 1.
For a polynomial f ∈ F[x], the set F[x]/( f ) consists of the residue classes
modulo f , written g + ( f ) or g (mod f ) or [g], for g ∈ F[x]. Two polynomials
g, h ∈ F[x] are said to be in the same residue class if and only if g − h ∈ ( f ). In
this case we write g + ( f ) = h + ( f ) or g ≡ h (mod f ) or [g] = [h].
We can define operations on the residue classes modulo f as follows.
1.3 Polynomials 15
[g] ± [h] = [g ± h]
[g][h] = [gh]
These operations are well-defined on F[x]/( f ) and make F[x]/( f ) into a ring,
called the residue class ring or quotient ring of F[x] by ( f ). The additive identity
is [0] and the multiplicative identity is [1].
Theorem 1.24 Let F be a field and f ∈ F[x]. The quotient ring F[x]/( f ) is a field
if and only if f is irreducible over F.
f (x) = am x m + · · · + a1 x + a0
g(x) = bn x n + · · · + b1 x + b0
as
m
n
R( f, g) = amn bnm (αi − β j )
i=1 j=1
Theorem 1.27 The conjugates of α ∈ F∗pn over F p have the same order.
Proof Observe that F pd is a splitting field of f over F p . By Theorem 1.27, the roots
of f have the same order in F∗pn . Let n = ord(α). Then α is a root of x n − 1. Thus
f | x n − 1 and so ord( f ) ≤ n. If m = ord( f ) < n then f | x m − 1, whence αm = 1,
which is impossible. Thus ord( f ) = n.
Proof Note that F∗pn is a group of order p n − 1. For α a root of f , if α has order
k, then ord( f ) = ord(α) = k by Theorem 1.28. So, k | p n − 1 by Theorem 1.5 .
x k − 1 = x dq+r − 1
= x dq x r − 1
= (x dq − 1)x r + x r − 1
= (x d − 1)g(x)x r + x r − 1
The purpose of discussing all this background from abstract algebra was to intro-
duce the next theorem. The theorems below will be used to develop the theory of
linear recurrent sequences in Chap. 2.
Theorem 1.33 Let f ∈ F p [x] such that f (0) = 0. Suppose that f = c f 1e1 f 2e2 · · ·
f kek , where c ∈ F p and each f i is a monic irreducible polynomial in F p [x]. Then
[War37, P. 279, Lemma 4.1] states the following two theorems. An integer poly-
nomial here means a (possibly multi-variable) polynomial with integer coefficients.
The first one is known as Schatanovski’s principle.
F(x) ≡ (x − α1 )(x − α2 ) · · · (x − αk )
≡ (x − β1 )(x − β2 ) · · · (x − βk ) (mod m)
then
Theorem 1.35 Let f (x) and F(x) be integer polynomials such that
and F(x) has roots α1n , α2n , . . . , αkn , where α1 , α2 , . . . , αk are the roots of f (x).
Then, for any positive integer l ≤ k and prime p, p | gcd(a0 , a1 , . . . , al−1 ) if and
only if p | gcd(b0 , b1 , . . . , bl−1 ).
Using Vieta’s formulas (see Vieta’s Formulas in the glossary), the coefficients of a
polynomial can be expressed as symmetric polynomials in the roots of the polyno-
mial. Let φi ( f ) be the elementary symmetric polynomial of degree i in the roots of
f . By Theorem 1.34,
bk−i+1 ≡ φi ( f ) (mod p)
bk−i+1 ≡ φi (g) (mod p)
Now, consider the polynomial G(x) with roots γ1n , γ2n , . . . , γkn . Again, using
Vieta’s Formulas, if ci is the coefficient of x i in G(x), then
φk−i+1 (G) = γ1n γ2n · · · γk−i+1
n
= ci
But if i < l, then at least one of the roots will be 0 in this product, hence ci ≡ 0
(mod p). Similarly, bi ≡ 0 (mod p) for i < l and p | bi for 0 ≤ i < l.
We now prove that if p | gcd(b0 , b1 , . . . , bl−1 ), then p | gcd(a0 , a1 , . . . , al−1 ).
Note that
≡ cln (mod p)
Cyclotomic polynomials have been extensively studied over the past few centuries.
[Gau01, §§341, P. 599] proved that the cyclotomic polynomial p (x) is irreducible.
[Sch46] and [Kro45] also proved the same result. [Kro54] and [Ded57] proved the
general case that n (x) is irreducible. And mathematicians have kept working on
20 1 Preliminaries
this, for example, the method shown by [Syl79] was used by [War55] to prove that
real Lehmer numbers have primitive divisors. However, in old times, notations were
not as consistent and convenient as they are now. Different authors such as [Car29],
[War55], [BV04], [Syl79] have used different notations throughout history. Ward
followed in Carmichael’s footprints, while other authors used whatever notation
they deemed fit. Nowadays it is a different story. Even though sometimes Cn (x) is
used, most authors, e.g., [Lan12, Section 3, Chapter 6, Part 2, Roots of unity] use
n (x). Cyclotomic polynomials have wide applications in number theory. However,
most common elementary texts do not cover this topic in detail even though one can
argue that the subject is elementary. We review cyclotomic polynomials briefly in
this section for our purposes in this book.
It is known that every positive integer greater than 1 can be written as a product of
primes. Here, primes are irreducible in the sense that they cannot be divided by any
other positive integer greater than 1. Consider a similar factorization for polynomials.
To be more specific, consider the factorization of x n − 1 into irreducible polynomials.
A general question is, how far can we keep factoring polynomials ? In the case of
x n − 1, simple algebra gives
x 2 − 1 = (x + 1)(x − 1)
x 3 − 1 = (x − 1)(x 2 + x + 1)
x 4 − 1 = (x − 1)(x + 1)(x 2 + 1)
Here we cannot further factorize any of the factors present into two or more non-
constant polynomials with integer coefficients. Without such a restriction, however,
one can obtain factorizations such as x 2 + x + 1 = (x − ω)(x − ω 2 ), where ω is a
complex cubic root of unity. The natural question that arises then is how we can find
a general procedure of factoring x n − 1 into irreducible polynomials. Fortunately,
cyclotomic polynomials are exactly these irreducible polynomials. The complex fac-
torization of x 2 + x + 1 should shed some light on how to obtain such a factorization
in the general case.
We can define the cyclotomic polynomial of order n as
n (x) = (x − ζ i ) (1.5)
1≤i≤n
gcd(i,n)=1
where ζ is a primitive n-th root of unity. The product is over all the positive integers
less than n which are relatively prime to n. Recall that ζ is an n-th root of unity if
ζ n = 1. At first, the definition (1.5) may seem intimidating. However, if you look
at it closely and compare it with the cubic case, you will see that it is simply a
generalization of that factorization.
The idea of factoring x n − 1 with roots of unity is a lot more powerful than one
would deem at first sight. It can even be connected with the history of Fermat’s Last
Theorem. In case you are not familiar with Fermat’s Last Theorem , it states that
1.4 Cyclotomic Polynomials 21
x n + y n = z n is not true for any positive integers x, y, z and n > 2. It has eluded
mathematicians for over three centuries. Finally, Andrew Wiles and Richard Taylor
proved it in around 1993−1994. Many prominent mathematicians failed to prove
this theorem despite significant efforts. In the process, a lot of theories have been
developed. Prior to the proof of the general case, mathematicians used to try to prove
the theorem in special cases. [WE78] is a good read for a historical perspective
on this. Euler proved the case n = 3. Fermat himself prove the case n = 4 using
Pythagorean triplets. Legendre and Dirichlet proved the case n = 5 in 1823. Then
Dirichlet proved the case n = 14 in 1832. Gabriel Lamé proved the case n = 7 using
roots of unity in 1839. Note that n = 7 covers the case n = 14, but the converse is
false. So, even Dirichlet failed to prove the case n = 7. Lamé believed that he could
generalize the idea. The main idea behind the proof was to write
and if, in some sense, the factors can be shown to be pairwise relatively prime, then
x p + y p = z p would imply that each factor above must be a p-th power. Then one
could use an infinite descent argument. Lamé’s work was based mostly on Liouville’s.
However, when Lamé presented this idea for the general case, Liouville himself
was not very enthusiastic. This idea indeed seems to be too cheap for so many
prominent mathematicians to miss for so long. For example, Lagrange showed the
factorization above as well. Lamé forgot to take into account the complexities the
introduction of complex numbers could present. So the concern was raised whether
prime factorization would remain unique if complex numbers were introduced. Going
forward, another mathematician Wantzel claimed he could prove unique factorization
for n ≤ 4. Then he said that it was easy to see the same argument applies for n > 4,
which was wrong of course. One does not easily see that the same argument applies
in general. Later, Kummer went on to introduce ideal complex numbers which, we
can say, laid the foundations of modern algebraic number theory. Anyway, as you
can see, the history of cyclotomic integers and polynomials is quite rich, dramatic,
and influential. Let us now continue our original discussion.
The smallest positive integer k for which ζ k = 1 is called the order of ζ. We
denote the order of ζ by ord(ζ). And ζ is a primitive n-th root of unity if ord(ζ) = n;
that is, ζ k = 1 does not hold for any positive integer k < n. If ζ is a primitive n-th
root of unity of order k, letting n = kq + r with 0 ≤ r < k, we see that k must divide
n. Otherwise, we would have ζ r = 1 with r smaller than k which would contradict
the minimality of k.
Fix a primitive n-th root of unity ζ and consider the powers of ζ modulo n. We are
interested in finding k such that ζ k is a primitive n-th root of unity; that is, ord(ζ k ) = n.
Letting ord(ζ k ) = d, we have n | dk, since ord(ζ) = n. If g = gcd(n, k) with n =
gm, k = gl, and gcd(m, l) = 1, then m | d. Using ζ dk = 1 along with d = mr for
some positive integer r , we get ζ nlr = 1. In order to make ord(ζ k ) minimal, we need
to have r = 1. This gives ord(ζ k ) = n/ gcd(n, k). If gcd(n, k) > 1, then ord(ζ k ) =
n/ gcd(n, k) < n. In this case, ζ k is not primitive. Therefore, ζ k is primitive only if
gcd(k, n) = 1. This shows that n (x) is a polynomial of degree ϕ(n).
22 1 Preliminaries
Primitive roots of unity are interesting and worth studying because they generate
all roots of unity.
We will now formally prove that n defined in (1.5) is indeed a polynomial with
integer coefficients, that is, a polynomial in Q[x]. We first prove the following result.
Proof It suffices to check that both sides have the same roots. The roots of the
polynomial on the left are exactly the n-th roots of unity. The roots of the polynomial
on the right are the primitive d-th roots of unity for each divisor d of n. Since each
n-th root of unity must be a primitive dth root of unity for a unique divisor d of n
and vice-versa, the conclusion follows.
Applying the Möbius Inversion (see Möbius Function and Möbius Inversion) to (1.6)
gives
n
μ(d)
n (x) = xd −1 (1.8)
d|n
The proof of this theorem relies on the fact that if f, g ∈ Q[x] are monic and f g ∈
Q[x], then f, g ∈ Q[x]. Then we can simply induct on n to prove that n ∈ Q[x].
Proof The claim is trivially true for n = 1. Assume that m is monic in Q[x] for all
m < n. Then
xn − 1 = d (x)
d|n
= n (x) d (x)
d|n
d<n
= n (x) f (x)
where
f (x) = d (x)
d|n
d<n
1.4 Cyclotomic Polynomials 23
= n (x p )P(x)
np
μ(ap)
P(x) = x ap − 1
a|n
n
−μ(a)
= xa −1
a|n
= n (x)−1
as desired.
This result extends to prime powers as follows.
Theorem 1.39 Let p be a prime number and n, k be positive integers. Then
⎧
⎪ k
⎨n (x p ) if p | n
pk n (x) = n (x )pk
⎪
⎩ otherwise
n (x pk−1 )
Theorem 1.40 If m, n are positive integers having the same prime factors such that
m | n, then
n
n (x) = m (x m )
Proof Let ν p (n) denote the largest integer a such that pa | n. Observe that ν p (m) ≥ 1
for all p | n. In a similar fashion as before, if d | n but d m, then ν p (d) ≥ ν p (m) +
1 ≥ 2 for some prime p. Then μ(d) = 0. Assuming n = mk, we have
n
μ(d)
n (x) = xd −1
d|n
n
μ(d) n μ(d)
= xd −1 xd −1
d|m d|n
dm
mk
μ(d)
= x d −1 ·1
d|m
m
μ(d)
= (x k ) d − 1
d|m
= m (x k )
n
= m (x m )
as desired.
Theorem 1.41 If n > 1 is odd, then 2n (x) = n (−x).
Theorem 1.42 If n = p1e1 p2e2 · · · pkek with the pi distinct primes, then
1.4 Cyclotomic Polynomials 25
e1 −1 e2 −1 ek −1
n (x) = p1 p2 ··· pk x p1 p2 ··· pk
We now look at the prime divisors of cyclotomic polynomials evaluated at the positive
integers. They allow us to establish some important results. Let a denote an arbitrary
positive integer.
Theorem 1.44 For a positive integer n and a prime divisor p of n (a), if p | d (a)
for some d | n with d < n, then p | n.
Proof Since a n − 1 = d|n d (a), if p is a prime divisor of d (a) and n (a) for
some d | n with d < n, then a is a multiple root of n (x) modulo p. Hence p | n by
Theorem 1.23.
Theorem 1.45 For a positive integer n and a prime divisor p of n (a), either p | n
or p ≡ 1 (mod n).
Proof If p | d (a) for some d | n with d < n, then p | n by Theorem 1.44. Other-
wise, let k = ord(a) in F∗p . We claim that k = n. This will imply n | |F∗p | = p − 1
by Theorem 1.5, and consequently, p ≡ 1 (mod n).
To prove the claim, observe that p | n (a) | a n − 1, so that k | n. If k < n, then
p | a k − 1 implies p | d (a) for some d | k by Theorem 1.36. Then d ≤ k < n,
contradicting the minimality of n.
ap − 1
1 + a + a 2 + · · · + a p−1 =
a−1
d| p d (a)
=
a−1
1 (a) p (a)
=
1 (a)
= p (a)
Theorem 1.47 There are infinitely many primes congruent to 1 (mod n) for any
positive integer n.
Proof It suffices to consider the case n > 1. If the number of such primes is finite,
let P be the product of all such primes and the prime divisors of n. Pick a positive
integer k such that n (P k ) > 1, so that it has at least one prime divisor q. Such a
k must exist since n (x) is a non-constant monic polynomial. Now q | P nk − 1, so
q P. On the other hand, by Theorem 1.45, either q | n or q ≡ 1 (mod n), hence
q | P. This is a contradiction.
Theorem 1.48 If m, n are positive integers such that gcd(m (a), n (a)) > 1, then
m/n is a prime power.
Proof Let p be a prime divisor of gcd(m (a), n (a)) and write m = p u b and n =
p v c for integers u, v ≥ 0 such that p bc. It suffices to prove that b = c.
Since p | m (a) and p | n (a), we have p | a m − 1 and p | a n − 1 by Theorem
1.36. Then p a. So, if u = 0, then p | b (a). Otherwise,
u
b (a p )
m (a) =
b (a pu−1 )
u u
Since p | m (a), we have p | b (a p ). By Fermat’s little theorem, a p ≡ a (mod p)
u
and so b (a p ) ≡ b (a) (mod p). Thus, in every case, p | b (a) and similarly,
p | c (a). Then p | a b − 1 and p | a c − 1 by Theorem 1.36, so that p | a h − 1,
where h = gcd(b, c). So by Theorem 1.36, p | d (a) for some d | h.
If b = c, we may assume that b > c. Then h < b. Hence p | d (a) and p | b (a)
with d | b and d < b. Therefore p | b by Theorem 1.44. This contradicts p bc. Thus
b = c.
The next theorem is from [Ser85, P. 133−134, Lemma 347]. It follows from
Theorem 1.18.
References
[BV04] Geo. D. Birkhoff and H. S. Vandiver. “On the Integral Divisors of a n − bn ”. In: Ann.
Mat. 5.4 (1904), pp. 173-180. issn: 0003486X. http://www.jstor.org/stable/2007263
[Car29] R. D. Carmichael. “A Simple Principle of Unification in the Elementary Theory of Num-
bers”. In: Amer. Math. Monthly 36.3 (1929), pp. 132-143. issn: 00029890, 19300972.
http://www.jstor.org/stable/2299678
References 27
[Ded57] R. Dedekind, Beweis für die Irreductibilität der Kreistheilungs-Gleichungen. Journal für
die reine und angewandte Mathematik 54, 27–30 (1857)
[Gau01] Carl Friedrich Gauss. Disquisitiones arithmeticae. 1801
[Kro45] L. Kronecker, Beweis dass für jede Primzahl p die Gleichung 1 + x + x 2 + +x p−1 =
0 irreductibel ist. Journal für die reine und angewandte Mathematik (Crelles Journal)
1845(29), 280–280 (1845). https://doi.org/10.1515/crll.1845.29
[Kro54] L. Kronecker, Memoire sur les facteures irréductibles de l’expression x n − 1. Journal
de mathématiques pures et appliquées : ou recueil mensuel de mémoires sur les diverses
parties des mathématiques 19, 177–192 (1854)
[Lan86] Serge Lang, Introduction to Linear Algebra (Springer, New York, 1986)
[Lan12] Serge Lang. Algebra. Springer-verlag New York Inc., 2012
[LN97] Rudolf Lidl and Harald Niederreiter. Finite Fields: Encyclopedia of Mathematics and Its
Applications. Vol. 7. 1997, p. 136
[Sch46] L. Schönemann. “Von denjenigen Moduln, welche Potenzen von Primzahlen sind.” In:
Journal für die reine und angewandte Mathematik 32 (1846), pp. 93-105. http://eudml.
org/doc/147334
[Ser85] Joseph Alfred Serret. Cours d’Algèbre supérieure Tome 1. fre. Paris: Gauthier-Villars,
1885. <error l="292" c="Undefined command " />http://eudml.org/doc/202932
[Syl79] J. J. Sylvester. “On Certain Ternary Cubic-Form Equations”. In: Amer. J. Math. 2.4
(1879), pp. 357-393. issn: 00029327, 10806377. http://www.jstor.org/stable/2369490
[War37] Morgan Ward. “Linear Divisibility Sequences”. In: Trans. Amer. Math. Soc. 41.2 (1937),
pp. 276-286. issn: 00029947. http://www.jstor.org/stable/1989623
[War55] Morgan Ward. “The Intrinsic Divisors of Lehmer Numbers”. In: Ann. Mat. 62.2 (1955),
pp. 230-236. issn: 0003486X. http://www.jstor.org/stable/1969677
[WE78] Lawrence Washington and Harold M. Edwards. “Fermat’s Last Theorem: A Genetic
Introduction to Algebraic Number Theory.” In: Mathematics of Computation 32.143
(1978), p. 943. doi: https://doi.org/10.2307/2006502.
Chapter 2
Linear Recurrent Sequences
In this chapter, we discuss linear recurrent sequences over a field. We give results
on when such a sequence is periodic and obtain an upper bound on the length of the
period, as well as show how to produce this bound. Finally, we discuss the theory
developed by Morgan Ward on the periodicity of such sequences with the help of the
double modulus. We will see a lot of results that are of fundamental importance in
this theory.
2.1 Introduction
where ai is the i-th term of the sequence and the ci are constants, is called a (linear)
recurrent sequence of order k. Note that like monic polynomials, ck = 1. We call
(a) homogeneous if α = 0, otherwise call (a) non-homogeneous. The order here is k
and not k + 1 because an+k is represented as a linear combination of the k preceding
terms of the sequence. This will make more sense when we define the characteristic
polynomial of (a) below. Recurrent sequences have also been called solutions to
linear difference equations [Bel30, War33a].
We will mostly focus on homogeneous sequences. In this chapter we discuss some
properties of recurrent sequences, especially periodicity. Considering (2.1) modulo
a positive integer m, we get a new sequence (r ) of residues where ri is the least non-
negative residue of ai upon division by m. We call (r ) the reduction of (a) modulo
m.
Consider the recurrent sequence (a) defined in (2.1) over the finite field Fm ,
so that the coefficients ck−1 , . . . , c0 and the terms an+k−1 , . . . , an are elements of
© The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd. 2021 29
M. Billal and S. Riasat, Integer Sequences,
https://doi.org/10.1007/978-981-16-0570-3_2
30 2 Linear Recurrent Sequences
Fn+1
lim
n→inf Fn
exists. This suggests that (F) behaves in some sense like a geometric sequence. To
find the common ratio, we let
Fn+1
φ = lim
n→∞ Fn
Fn−1
= lim 1 +
n→∞ Fn
1
=1+
φ
φ =1+φ
2
(2.3)
√
1± 5
φ=
2
As a matter of fact, we have
√ n √ n
1 1+ 5 1− 5
Fn = √ −
5 2 2
Fn = b1r1n + b2 r2n
for some constants b1 , b2 . We can solve for b1 , b2 using the initial values F0 =
0, F1 = 1 of the Fibonacci Sequence and obtain
r1n − r2n
Fn =
r1 − r2
The above analysis worked because the roots of the characteristic polynomial of
(F) were distinct. If they were not distinct, then we would expect the solution to be
r1n − r2n
lim = nr2n−1
r1 →r2 r1 − r2
We can extend this idea to the general sequence (2.1). Assuming α = 0, so that
the sequence (a) is homogeneous, the characteristic polynomial of (a) is
Theorem 2.1 Given the initial state vector (a0 , a1 , . . . , ak−1 ) of the homogeneous
recurrent sequence (a) of order k, if the characteristic polynomial f (x) of (a) has k
distinct roots α1 , α2 , . . . , αk , then for any n ∈ N,
for some constants b1 , b2 , . . . , bk that are uniquely determined by the initial state
vector.
As in the case of the Fibonacci Sequence, the assumption that the roots of f (x)
are distinct is very important here. We will simply mention when this theorem is
applicable.
The characteristic polynomial f (x) of (2.1) can be obtained in another way.
Consider the k × k matrix C defined as follows. If k > 1, then
⎛ ⎞
0 0 ···0 c0
⎜1 0 ···0 c1 ⎟
⎜ ⎟
⎜ ···0 c2 ⎟
C = ⎜0 1 ⎟
⎜ .. .. .. .. .. ⎟
⎝. . .. . ⎠
0 0 · · · 1 ck−1
and otherwise, C = (c0 ). The matrix C is called the companion matrix of (a). As
we will soon see, this matrix will play a big role in our theory. For now, just notice
that the characteristic polynomial can be written as
f (x) = det(x I − C)
32 2 Linear Recurrent Sequences
0 −1
C=
1 2
sn = s0 C n
2.2 Periodicity
Theorem 2.2 Let (a) be a linear recurrent sequence of order k with characteristic
polynomial f (x) = x h g(x), where gcd(g(x), x) = 1. Then the sequence (c) with
ci = ai+h has characteristic polynomial g(x).
Theorem 2.3 Let m be a positive integer and (a) be a recurrent sequence of order
k over Fm . Then (a) is ultimately periodic with period
mk if (a) is non-homogeneous
ρ≤
m − 1 otherwise
k
Proof The number of different possible state vectors of (a) is m k . So, among the state
vectors si for 0 ≤ i ≤ m k , there must be two that are equal. In particular, there exists
0 ≤ i < j ≤ m k such that si = s j . Incorporating this into (2.1) gives sn+ j−i = sn
for all n ≥ i. Hence (a) is ultimately periodic with period ρ = j − i ≤ m k . If (a) is
homogeneous, then excluding the zero vector from our count gives ρ ≤ m k − 1.
So any recurrent sequence over a finite field is ultimately periodic, although not
necessarily periodic . It is easy to construct an ultimately periodic sequence that is
not periodic.
Theorem 2.4 Let F be a finite field and (a) be a recurrent sequence over F given
by
Proof We want to show that (a) has pre-period 0. Let ρ and n 0 be the least period and
pre-period of (a) respectively. Then an+ρ = an for all n ≥ n 0 . Since c0 = 0, there is
an inverse c0−1 ∈ F. Then if an+ρ = an for some n ≥ n 0 , we can obtain an+ρ−1 = an−1
as follows. If k ≥ 1, then an+k+ρ−1 = an+k−1 , so
and
34 2 Linear Recurrent Sequences
Thus, an+ρ−1 = an−1 and by induction, an+ρ−i = an−i for 0 ≤ i ≤ n. This shows that
n 0 = 0 and an+ρ = an for all n ≥ 0, as desired.
Theorem 2.5 Let F be a finite field. If ρ is the least period of the recurrent sequence
(a) over F and d is a period of (a), then ρ | d.
an = an+d
= an+qρ+r
= an+(q−1)ρ+r
= ···
= an+r
If r > 0, then we have a period r with 0 < r < ρ , which is a contradiction. Thus
ρ | d.
Bell [Bel30] gave the next theorem that connects the characteristic polynomial to
the least period of a recurrent sequence. This is a very nice result and while we could
use the theory we developed for fields, we present his original proof that uses only
the ideas developed in this section.
Theorem 2.6 Let (a) be a recurrent sequence of order k with an irreducible char-
acteristic polynomial f . Then (a) has a unique least period ρ if and only if k = ϕ(ρ)
and the roots of f are the primitive ρ-th roots of unity.
an = bk αkn + · · · + b1 α1n
ρ ρ
bk (αk − 1) + · · · + b1 (α1 − 1) = 0
ρ ρ
bk αk (αk − 1) + · · · + b1 α1 (α1 − 1) = 0
..
.
ρ ρ
bk αkk−1 (αk − 1) + · · · + b1 α1k−1 (α1 − 1) = 0
ρ
We can see that the system has a solution only if bi (αk − 1) = 0 for 1 ≤ i ≤ k. So,
first we show that bi = 0 for 1 ≤ i ≤ k. Let h be the number of i such that bi = 0.
Then (a) can be written as a recurrent sequence of order r − h. If the characteristic
polynomial in this case is g, then g shares those r − h roots with f . So g is an
integer polynomial that divides f . This forces g to be constant, whence h = 0. Thus,
ρ
αi − 1 = 0 and αi is a ρ-th root of unity. Furthermore, αi must be a primitive ρ-th
ρ
root of unity as ρ is the smallest positive integer that satisfies αi = 1. Finally, the
number of primitive ρ-th roots is ϕ(ρ). So, we must have k = ϕ(ρ).
d|ρ
which is the cyclotomic polynomial ρ (x). [War33a] extended this theorem as fol-
lows.
Theorem 2.7 Let (u) be a recurrent sequence of order k such that for fixed positive
integers a, b we have
for some non-zero constants bi . Let c = u a+ib for 0 ≤ i ≤ k. We get the following
system of equations from (2.4)
(b1 α1 )αib
1 + (b2 α2 )α2 + · · · + (bk αk )αk − c = 0
ib ib
88. How often we hear a delicate lady declare that she can only eat
one meal a day, and that is a hearty meat supper the last thing at
night; and who, moreover, affirms that she can neither sleep at night,
nor can she have the slightest appetite for any other meal but her
supper, and that she should really starve if she could not have food
when she could eat it! The fact is, the oppressed stomach oppresses
the brain, and drives away sleep, and appetite, and health. The habit
is utterly wrong, and oftentimes demands professional means to
correct it.
89. How is it that sometimes a lady who has an excellent appetite
is, notwithstanding, almost as thin as a rake? It is not what she eats,
but what she digests, that makes her fat. Some people would fatten
on bread and water, while others would, on the fat of the land, be as
thin as Pharaoh’s lean kine. Our happiness and our longevity much
depend on the weakness or on the soundness of our stomachs: it is
the stomach, as a rule, that both gauges our happiness and that
determines the span of the life of both men and women. How
necessary it is, then, that due regard should be paid to such an
important organ, and that everything should be done to conduce to
the stomach’s welfare,—not by overloading the stomach with rich
food; not by a scanty and meager diet; but by adopting a middle
course, betwixt and between high living and low living—the juste
milieu. We should all of us remember that glorious saying—those
immortal words of St. Paul—“Be temperate in all things.”
90. Where a lady is very thin, good fresh milk (if it agree) should
form an important item of her diet. Milk is both fattening and
nourishing, more so than any other article of food known; but it
should never be taken at the same meal (except it be in the form of
pudding) with either beer or wine: they are incompatibles, and may
cause disarrangement of the stomach and bowels. Milk would often
agree with an adult, where it now disagrees, if the admixture of milk
with either beer or wine were never allowed.
91. Let me advise my fair reader to take plenty of time over her
meals, and to chew her food well; as nothing is more conducive to
digestion than thoroughly masticated food. No interruptions should
be allowed to interfere with the meals; the mind, at such times,
should be kept calm, cheerful, and unruffled, for “unquiet meals
make ill digestions.”
92. Many persons bolt their food! When they do, they are drawing
bills on their constitutions which must inevitably be paid! The teeth
act as a mill to grind and prepare the food for the stomach; if they do
not do their proper work, the stomach has double labor to perform,
and being unable to do it efficiently, the stomach and the whole body
in consequence suffer.
93. The teeth being so essential to health, the greatest care should
be taken of them: they should be esteemed among one’s most
precious possessions.[19]
94. With regard to beverage, there is, as a rule, nothing better for
dinner than either toast and water, or, if it be preferred, plain spring
water—
“Naught like the simple element dilutes;”[20]
117. How glorious, and balmy, and health-giving, is the first breath
of the morning, more especially to those living in the country! It is
more exhilarating, invigorating, and refreshing than it is all the rest
of the day. If you wish to be strong, if you desire to retain your good
looks and your youthful appearance, if you are desirous of having a
family, rise betimes in the morning; if you are anxious to lay the
foundation of a long life, jump out of bed the moment you are awake.
Let there be no dallying, no parleying with the enemy, or the battle is
lost, and you will never after become an early riser; you will then lose
one of the greatest charms and blessings of life, and will, probably,
not have the felicity of ever becoming a mother; if you do become
one, it will most likely be of puny children. The early risers make the
healthy, bright, long-lived wives and mothers. But if a wife is to be an
early riser, she must have a little courage and determination; great
advantages in this world are never gained without; but what is either
man or woman good for if they have not those qualities?
118. An early riser ought always to have something to eat and
drink, such as a little bread and butter, and either a cup of tea or a
draught of new milk, before she goes out of a morning; this need not
interfere with, at the usual hour, her regular breakfast. If she were to
take a long walk on an empty stomach, she would for the remainder
of the day feel tired and exhausted, and she would then, but most
unfairly, fancy that early rising did not agree with her.
119. The early morning is one of the best and most enjoyable
portions of the day. There is a perfect charm in nature which early
risers alone can appreciate. It is only the early riser that ever sees
“the rosy morn,” the blushing of the sky, which is gloriously
beautiful! Nature, in the early morning, seems to rejoice and be glad,
and to pour out her richest treasures: the birds vie with each other in
their sweetest carols; the dew on the grass, like unto myriads of
diamonds, glittering and glistening, and glinting in the rays of the
sun; occasionally the cobwebs on the shrubs and bushes, like
exquisite lace sparkling with gems; the fresh and matchless perfume
and fragrance of the earth and flowers;—these, one and all, are
gloriously beautiful to behold, and can only be enjoyed to perfection
in the early morning, while the majority of people, during the
choicest periods of their existence, are sweltering, and dozing, and
deteriorating both in body and mind, on beds of down, when they
ought to be up, out, and about! Can it be wondered at, when such
weakening and enervating practices are so much in vogue—for
luxury is the curse of the day—that there are so many barren wives in
England? It looks, on the first blush, that many of the customs and
practices of the present day were to cause barrenness; for, assuredly,
if they had been instituted on purpose, they could not have
performed their task more surely and successfully.
120. It might be said that the dews of the morning are dangerous!
The dews of the early morning are beneficial to health, while the
dews of the evening are detrimental. How truly the poet sings—
“Dew-drops are the gems of morning,
But the tears of mournful eve!”[24]
For, after all, out-door exercise and useful occupation are the best
composing medicines in the world! Encompassed as she is with every
luxury—partaking of all the delicacies of the season, of the richest
viands, and of the choicest wines—decked out in costly apparel—
reclining on the softest cushions—surrounded with exquisite scenery,
with troops of friends, and with bevies of servants;—yet,
notwithstanding all these apparent advantages, she is oftentimes one
of the most debilitated, complaining, “nervous,” hysterical and
miserable of mortals. The causes of all these afflictions are—she has
nothing to do; she is overwhelmed with prosperity; she is like a fire
that is being extinguished in consequence of being overloaded with
fuel; she is being killed with overmuch kindness; she is a drone in a
hive where all must work if they are to be strong and well, and bright
and cheerful; for labor is the lot of all and the law for all, for “God is
no respecter of persons.” The remedies for a lady affected as above
described are simple and yet efficacious—namely, simplicity of living,
and an abundance of out-door exercise and of useful occupation. It
would have been to the manifest advantage of many a fair dame if
she were obliged to put down her close carriage, and were compelled
to walk instead of drive. Riding in close carriages nurse many
ailments which walking would banish; a brisk walk is the best tonic
and the most reviving medicine in the world, and would prevent the
necessity of her swallowing so much nauseous physic. Nature’s
simple remedies are oftentimes far superior and far more agreeable
than any to be found in the Pharmacopœia. It would have been a
blessing to many a rich, indolent, and luxurious lady if she had been
born in a lower rank—in one in which she had been compelled to
work for her daily bread; if she had been, she would, in many
instances, have been far happier and healthier than she now is.
Indolence and luxury kill more than hard work and hard fare ever
did or ever will kill. Indolence and luxury are slow poisons; they
destroy by degrees, but are in the end as certain in their deleterious
effects as either arsenic or deadly nightshade—
“Come hither, ye that press your beds of down,
And sleep not; see him sweating o’er his bread
Before he eats it. ’Tis the primal curse,
But softened into mercy—made the pledge
Of cheerful days, and nights without a groan.”
151. It might be said, What has all this to do with the health of a
wife? I reply, much. The customs, habits, and luxuries of the present
day are very antagonistic both to health and fecundity.
152. She must not coddle, nor should she muffle up her throat with
furs. Boas are the most frequent cause of sore throats and quinsies,
and therefore the sooner they are discarded the better. “And this is
perfectly true, though few seem to be aware of the fact. Relaxed
throats would be rare if cold water was more plentifully used, both
externally and internally, and mufflers were laid aside.”[32]
153. If my gentle reader will freely use cold water ablutions, she
will find that she will not require nearly so much clothing and
muffling up. It is those who use so little water who have to wear so
much clothing; and the misfortune of it is, the more clothes they
wear the more they require. Many young people are wrapped and
muffled up in the winter time like old folks, and by coddling they
become prematurely old—frightened at a breath of air and at a
shower of rain, and shaking in their shoes at an easterly wind!
Should such things be?
154. Pleasure, to a certain degree, is as necessary to the health of a
young wife, and every one else, as the sun is to the earth—to warm, to
cheer, and to invigorate it, and to bring out its verdure. Pleasure, in
moderation, rejuvenizes, humanizes, and improves the character,
and expands and exercises the good qualities of the mind; but, like
the sun, in its intensity it oppresseth drieth up, and withereth.
Pleasures kept within due bounds are good, but in excess are utterly
subversive of health and happiness. A wife who lives in a whirl of
pleasure and excitement is always weakly and “nervous,” and utterly
unfitted for her duties and responsibilities.
155. Let the pleasures of a newly-married wife, then, be dictated by
reason, and not by fashion. She ought to avoid all recreations of an
exciting kind, as depression always follows excitement. I would have
her prefer the amusements of the country to those of the town, such
as a flower-garden, botany, archery, croquet, bowls,—everything, in
fact, that will take her into the open air, and will cause her to
appreciate the pure, simple, and exquisite beauties of nature.
Croquet I consider to be one of the best games ever invented: it
induces a lady to take exercise which perhaps she would not
otherwise do; it takes her into the open air, it strengthens her
muscles, it expands her chest, it promotes digestion, it circulates her
blood, and it gives her an interest in the game which is most
beneficial both to mind and body.
156. Oh, that my countrywomen should prefer the contaminated
and foul air of ball and of concert-rooms, to the fresh, sweet, and
health-giving air of the country!
157. Let me in this place enter my strong protest against a young
wife dancing, more especially if she be enceinte. If she be anxious to
have a family, it is a most dangerous amusement, as it is a fruitful
source of miscarriage; and the misfortune is, that if she once have a
miscarriage, she might go on again and again, until her constitution