Rochester Institute of Technology
RIT Scholar Works
Theses
Thesis/Dissertation Collections
1997
Factoring integers defined by second and third
order recurrence relations
Kirk Ocke
Follow this and additional works at:
http://scholarworks.rit.edu/theses
This Thesis is brought to you for free and open access by the Thesis/Dissertation Collections at RIT Scholar Works. It has been accepted for inclusion
in Theses by an authorized administrator of RIT Scholar Works. For more information, please contact
ritscholarworks@rit.edu
.
Recommended Citation
Rochester Institute of Technology
Computer Science Department
Factoring Integers Defined by Second and Third Order
Recurrence Relations.
by
Kirk Ocke
A thesis, submitted to
The Faculty of the Computer Science Department
in partial fulfillment of the requirements for the degree of
Master of Science in Computer Science
Approved by:
Dr. Stanislaw Radziszowski
Rochester Institute of Technology
Dr. Peter Anderson
Rochester Institute of Technology
Dr. Pasquale Arpaia
Saint John Fisher College
Factoring Integers Defined
by
Second and Third Order
Recurrence Relations.
I, Kirk
J. Ocke, hereby grant permission to the Wallace Library of
the Rochester Institute of Technology to reproduce my thesis in whole or in
part. Any reproduction will not be for commercial use or profit.
Kirk
J. Ocke
Abstract
Factoring the first two-hundred and fifty Fibonacci numbers using
just trial division would take an unreasonable amount of time. Instead
the problem must be attacked using modern factorization algorithms.
We look not only at the Fibonacci numbers, but also at factoring
in-tegers defined by other second and third order recurrence relations.
Specifically we include the Fibonacci, Tribonacci and Lucas numbers.
We have verified the known factorizations of first 382 Fibonacci
num-bers and the first 185 Lucas numnum-bers, we also completely factored the
first 311 Tribonacci numbers.
Contents
1
A Brief Thank you
2
Introduction
2.1
Definitions, Notation and Elementary Properties
2.1.1
Definitions and Elementary Properties
2.1.2
Notation
.
3
General Purpose Factoring Algorithms
3.1
Pollard (p - 1) Method . . .
3.2
Pollard Rho Method . . . .
3.3
Small Prime Trial Division.
3.4
Fermat's Factoring Method
3.5
Elliptical Curves Method
.
3.6
Multiple Polynomial Quadratic Sieve
3.7
Primality Tests
.
3.7.1
Fermat Probable Primes.
4
Recurrence Relations
4.1
Fibonacci Numbers . . . .
4.1.1
Fibonacci Factorization Algorithm
4.1.2
Results
4.2
Lucas Numbers
.
4.2.1
Results
.
4.3
Tribonacci Numbers
4.4
Results...
4.5
Gn
=
Gn-l
+
Gn
-3
Numbers
4.5.1
Results
.
3
4
4
5
5
5
5
7
11
11
12
13
15
15
5
Application
ofMethods
19
6
Results
22
7
Platform
24
8
Future Work
25
A
Tables
ofFactorizations
26
B
Properties Discovered
26
1
A Brief Thank
you
I
wouldlike
to
thank
allthose
peoplethat
helped
me accomplishthis
work.I'd first
like
to thank
my thesis committee, Dr.
Stanisiaw
Radziszowski
andDr. Peter
Anderson,
ofthe
Rochester
Institute
ofTechnology,
andDr. Pat
Arpaia
ofSaint
John Fisher
College,
for
their
collective effortin
helping
memake
this
paperboth
intelligible,
andhopefully
meaningful.I
would alsolike
to
thank
Dr.
Dan
Cass
ofSaint
John Fisher
College,
for
helping
mediscover
and provemany
propertiesofthe Tribonacci
numbers.Finally,
I
wouldlike
to
dedicate
this thesis
to
my wife,
Mary
Jo. Without
her
ever presentlove
andsupport, my
studies andthesis
wouldbe
of no more2
Introduction
Factoring
integers has been
a populartopic
in
the
field
of numbertheory
since
shortly
afterthe
integers
werediscovered.
Within
the
pasttwenty-five
yearsthe
factorization
of large1integers has become
popularin
the
field
of algorithmicnumbertheory,
due
almostexclusively to
the
availability
of
inexpensive,
high
performance computers.This
paperdiscusses
someof
the
most commonfactorization
algorithms, both
classical andmodern,
specifically in
terms
offactoring
integer
sequencesdefined
by
second andthird
order recurrence relations.Many
papershave
been
publishedregarding
factoring
particulartypes
ofnumbers;
among
these
are:Tables of Fibonacci
andLucas
Factorizations
by
John
Brillhart,
Peter
Montgomery
andRobert Silverman
[8],
andFactoriza
tion
of
the tenth
and eleventhFermat
numbersby
Richard Brent
[3]
.There
are also numerous
books
onthe
subject of modernfactorization,
includ
ing
two that
are required reading:Prime Numbers
andComputer
Methods
for
Factorization,
by
Hans Riesel
[14]
andthe
classicThe
Art
of
Computer
Programming
(volume
2) by
Knuth
[9].
In
Section
3
wedescribe
general purposefactoring
algorithms, includ
ing
someelementary complexity
analysis of some ofthe
algorithms.The
propertiesand specialized
factoring
algorithms ofthe
integer
sequences con sideredin
this
paper arediscussed
in
section4.
Section
5 is
adescription
ofhow
the
algorithms and methodsdiscussed
areapplied,
andthe
computational
results ofapplying
the
factoring
algorithmsis
coveredin
section6.
A
supplementto this
papercontainsthe
actualfactorization
tables.
We finish
ourintroduction
with afew
words ondefinitions,
propertiesand notation used
throughout this
paper.2.1
Definitions,
Notation
and
Elementary
Properties
It is
assumedthe
readerhas
afamiliarity
withelementary
numbertheory
andgroup
theory.
A little
knowledge
of algebraic numbertheory
andfield
theory
(abstract
algebrain general)
makes some ofthe
more obtuse algorithms abit
more comprehensible.Suggested
reading includes
An Introduction
to
the
Theory
of
Numbers,
by Hardy
andWright
[6],
andAbstract
Algebra, by
Herstein
[7].
1
2.1.1
Definitions
andElementary
Properties
Theorem
2.1.1
(Fermat's
Theorem)
Ifp
is
aprime, then
ap_1=
1 modp,
for
alla^
0
mod p.2.1.2
Notation
fn{x)
the
nthfunctional
composition of/.
gcd(a,
b)
the
greatest commondivisor
of a andb.
Gn
-the
nthnumber
in the third
order recurrence relationdefined
by Gn
=Gn-i
+
Gns.
Mn
-the
multiplicative
group
of all primitive residue classes modn.p
-is
always reserved
to
represent a prime.Sm
aninteger
sequenceperiodically
recurrent modm.Tn
the
nthTribonacci
number.Un
the
nthFibonacci
number.Vn
the
nthLucas
number.Zn
the
positiveintegers
mod n.Z+
the
positiveintegers.
(a/b)
-Lengendre's
symbol.
I
,1
binomial
coefficient3
General Purpose
Factoring
Algorithms
This
sectionis intended
to
familiarize
the
reader withgeneral purposefac
toring
algorithmsfor
numberswithout specialform.
3.1
Pollard
(p
-1)
Method
The
Pollard
p
1
methodis based
onthe
following
two
observations.First,
if p
1\Q,
andgcd(a,p)
=1,
then
p\a1.
This
follows
directly
from
Fermat's
Theorem2.
Second,
supposefor
somefactor
p
ofN,
that
i
where each g"*
<
B,
B
arelatively
smallbound
(i.e.,
p
1
is
composed ofonly
smallfactors).
2Since
aQ1
= &(p~1)k-
1
= (afc)p_1-1,
for
somek,
and sincep
-1
|
Q, by
Fermat's
theorem
(a*)p_1 =1
modIf
supposition(1)
is
true,
and welet
Q
be
the
product all primes and prime powersless
than
ourlimit B
(Q
=JJr^
,for
all rf*<
B,
r,
prime andfa
>
0),
then
Q
is
a multiple ofp
1,
andp
= gcd(a^l,iV)
is
a non-trivialfactor
ofN. If
onthe
otherhand
p
1
contains afactor
f
>
B,
then
in
generalthe
algorithmfails.
Algorithm
3.1.1
(Pollard
(p
1)
Factoring
Algorithm)
1.
(initialize)
Choose
a searchlimit
B,
choose a seed value
ao
(e.g.
ao
=13j,
let
j
=1
(counter),
let Factor Base
allprimes and prime powersless
than
or equalto
B
({qp\
for
allqf'<
B,
q
prime}).Assume
Factor
Base
is
ordered,
andthat the largest index is J.
2.
aj
afj^x
modN,
wherepj
is the
jthelement
of Factor Base.
3.
Ifgcd(aj
1,N)
7^1,
then
gcd(ay
1,
N)
is
afactor
of N
and we stop.4-3=3
+
1
5-
if
j
<
J,
then
Goto
2
This
method candramatically
speedup
factorization
if
the
number contains
afactor
p
suchthat p
1 is
comprisedonly
of smallfactors.
When
this
is
notthe
casehowever,
the
algorithmis
nobetter
than trial
division,
sothe
methodis
used witharelatively
smallbound
onthe
factors
ofp
1.
There
is
anextensionto
th.ep1
algorithmthat
canbe
usedif
nofactors
arefound
withinthe
searchlimit
B.
Suppose,
asin
(1)
that
where
Q
is
the
only
primefactor
ofp
1
that
exceedsB.
Now
let b
=LJ
q^
modN,
for
allq^
<
B
(i.e.,
the
final
valueofthe
calculation ofstep
2
ofthe p
1
algorithmabove)
, and choose anewsearchlimit
B2
suchthat
B
<
B2. Define
the
setR
asthe
set of all primesbetween
the
largest
primeless
than
B
andB2
{{ri\n
>
(largest
prime<
B),
andn <
B2}).
Now
recursively
find
the
valuebn+i =
bnh{n+i-n)modN^
(2)
if
gcd(&ri+1Algorithm
3.1.2
(Pollard
(p
1)
Factoring
Algorithm
Phase
2)
1.
(initialize)
Choose
a new searchlimit
B2,
let b
equalthe
final
computationof
ain
step
2
of
algorithm3.1.1,
define
{ri\ri
>
largest
prime<
B,
andri <
B2};
assumeordered,
withlargest index I.
2.
calculate b^1 =bTib^i+1-r^
modN
3.
If
gcd(67"i+1-1,
N) ^
1,
then
gcd(fe7'i+1-1,N)
is
afactor
of N
and we stop.4. i
=i
+
1
5.
if
%<
I,
then
Goto
2
The
second phase ofthis
algorithmwas notused,
but
is
presentedhere
for
completeness.3.2
Pollard Rho Method
Pollard's
Rho
methodis
aMonte
Carlo
algorithmthat
usually
finds
afactor,
notnecessarily
prime,
of aninteger N in
OiN1'4)
arithmeticoperations.The ideas
behind Pollard's Rho
methodcanbe described
in
grossterms3as
follows:
1.
Given
a composite numberN,
andp,
an unknownfactor
ofN,
construct asequence
S
that
is
periodic mod p.2.
Determine
the
periodofS.
3. Determine p using
the
abovesequence andits
period.The
first
thing
we mustdo
is
find
away to easily
construct aninteger
sequence
that
is
periodic modp.Consider
the
sequenceSm
(m
a positiveinteger),
defined
by,
Sm
{xi\xi
=f(xi-i)
modm,
Vi
G
Z+,
0
< xq <
m,
f
apolynomial}.(3)
The
sequenceSm
canbe
constructedby
taking
the
successivefunctional
composition of aninitial
value(xq)
for
some polynomial/
(throughout
the
3As
you will soon seethis
is
agrossly
oversimplifieddescription,
but it
willdo
as aremainder of
this
sectionany
function
/
shouldbe
assumedto
be
apoly
nomial,
unless otherwisestated),
then
calculatethat
value modulo someprimep.
Constructing
the
sequenceSm
is computationally
inexpensive,
andshowing that
Sm
is
periodicis
notdifficult.
Lemma 3.2.1
Sm
is
periodic.Proof.
Applying
the
Pigeon
Hole
principleto the
first
m+ 1
elements ofSm,
some valuefl{xo)
mustbe
repeated.Let
i
be
the
index
ofthe
first
occurrence offl(xo),
andlet
j
be
the
index
ofthe
nextoccurrenceoff%(xo)
(i.e.,
pixo)
=fj(x0)).
Label
f{xQ)
= a.Then
for
allk
>
0,fi+k(x0)
=fk(a)
=fi+k{xo)
(the fact
that
/
is
a polynomialis
necessary,
as you can see).So
Sm
is
periodicfrom
the
index i
on.Lemma 3.2.2
If
Sm
is
periodic andXi,Xj
G
Sm,j
>
i,
suchthat,
Xi
=Xj,
then
Sm
is
periodicstarting
at x^.Proof.
Proved
as part ofthe
proof ofLemma
3.2.1
Now
that
we can constructSm
with nogreatdifficulty,
suppose we wishto
find
its
period.Obviously
adirect
searchcomparing arbitrarily
long
sub sequenceswillwork,
but
is
out ofthe
questionfor
sequenceswithsufficiently
large
period-lengths.Fortunately
there
exist algorithmsto
detect
the
periodthat
are efficient.Specifically,
Floyd's cycle-finding
algorithm4"detects
the
period ofa periodic sequence
{xi}
modmby
testing
if
X2i
=Xi
modm.Theorem 3.2.1
(Floyd's Cycle
Finding Theorem)
The
periodof
a periodicsequence
Sm
canbe detected
by
comparing
X2%
=Xi
mod m.Proof.
Let
abe
the
aperiodiclength
andI
be
the
period-length
ofSm. Let
j >i,
i
> a, then
Xj
=Xi
mod mimplies that
j
i
=kl
for
somek
>
0
(i.e.,
j
iis
a. multipleofthe
period)
.So,
if
X2%
=Xi
modm, then
i is
a multipleof
the period,
andthe
sequenceis
periodicfrom
X2%
onwards.Conversely,
if
Xj
=Xi
modmis
true
for
j
=i +
kl,
for
k
>
0,
V
i
>
a.Eventually
there
will
be
ani
suchthat
j
=2i
(specifically
whenkl
=i)5.
Algorithm 3.2.1
(Floyd's
Cycle-Finding
Algorithm)
4Richard
Brent
[2]
has
found
a moreefficientalgorithmthan
Floyd's,
andit is generally
1.
Given
a period sequenceSm
asdefined
in
(3).
2.
(initialize)
x =x\,y
=f{x\)
3. Repeat
{x
=f{x),y
=f(f(y))
}
Until
x=y.Once Floyd's
algorithmterminates,
the
period canbe
found
by
comparing
the
terminating
value ofx,
which we will callXi
withXi+i,Xi+2,
untilXi+i
=Xi,
at which point weknow I is
the
period-length.Pollard
appliedFloyd's
algorithmto
simple polynomialsf(x)
modN
(specifically
quadratics ofthe
form, f{x)
= x2+ a,
a^
0
or2)6,
andreplaced
the termination test
x =y
withif
gcd(|a;y\,N)
>
1,
then
stop.Pollard
also showedthat
there
is
noneedto
computethe
greatest commondivisor
onevery iteration
[12],
but
that
we caninstead
calculaten
Qn
=Y[(x*
~xi)' i=l
and
apply Euclid's
algorithmonly
occasionally.The
chancesthat
the
algorithm will
fail because
Qn
=0
does
increase,
so we shouldn't performEuclid's
algorithmtoo infrequently.
Algorithm 3.2.2
(Pollard's
Rho
Factoring
Algorithm)
1.
(initialize)
Choose
a quadraticf(x)
=x2+ a,
a/
0
or2,
choose
x\ G
{1,
2,
. . .,
N
1},
choose a
frequency
c with whichto
apply Euclid's
algorithm,
choose a search
limit
B,
let
1,
let
i
=1.
2.
x=x1,y
=f(xi)
3-
Qi
=(y-x)Qi-i
modN
4. ifi
=0
mod c andgcd(Qi,N)
>
1,
then
stop
5.
x=f(x),y
=f(f(y)).
6a
=0
shouldbe
avoidedfor
obviousreasons;
we quoteKnuth
[9,
p.371]:
'a
= 2should also
be
avoided,
sincethe
recurrence xm+i =i
2
has
solutions ofthe
form
xm=
+
.Other
values of ado
not seemto
lead
to
simplerelationships mod6. i
=i + l.
7.
if
i
<
B
Goto
4,
else stop.Although Pollard's Rho
algorithmis
asbeautifully
simple asFloyd's
cyclefinding
algorithm, why
should weexpectit
to
producethe
unknownfactor
piConsider
the
sequenceSn
generatedby
the
function
f(x)
=(x2+a)
modN.
According
to
Lemma
3.2.1,
Sn
is
periodic(although
the
period-length couldbe large).
Now
considerthe
sequenceSp
generatedby
the
function
f(x)
given
in
Sn,
wherep is
the
smallest primefactor
ofN
(i.e.,
Sp
Sn
modp).If
X2i
=Xi
modN,
then
it follows
that X2i
=Xi
modp,
so we canthink
ofthe
test
gcd(|xy\,N)
>
1
onSn
assimply
being
a redundantform
ofthe
sametest
onSp,
which willterminate
in
at mosti
<
p iterations.
The
worst casefor
Pollard's
algorithmthen
is p iterations. Brent
[2]
and
Knuth
[9,
p.367-369]
have
shownthat
the
expected value7of
i
is ap
proximately
(7r/2)5/2p1/2. So
the
numberofiterations
ofPollard's
algorithm neededto
find
the
factor
p is
onthe
order of0(Nll4).
An
intuitive
(and
necessarily
less
rigorous)
algebraic argumentshowing
why
afactor
p
ofN
(where
N is sufficiently
large
to
apply
the
probabilisticarguments
that
follow)
is
likely
to
be
found
in
0{N1/4)
iterations
ofPollard's
Rho
methodis
givenby
Riesel
[14,
p.182-183]:
Vi
=x2i
-Xi =x\i_x +
a-x2_t
-a
=
x\i_1
X2_x
=(x2i-l
+
Xi-i)(x2i-l
~Xi-i)
=
(x2i-l
+
Xi-i)(x2i-2
+
Xi-2){x2i-2
~Xi-2)
(x2i-l
+
Xi-l)(x2i-2
+
Xi-2)...{Xi
+
X0)(xi
-X0)
So
there
arei + 1
algebraicfactors
in
yj.How
many iterations
do
we needto
ensure
that
allprimesless
than
orequalto
p
areincluded in the
yj's?Since
the
number of primefactors
<
G
of a given numberN is approximately
ln(ln(G)),
see[14,
p.161],
executing
niterations
ofFloyd's
algorithm wehave
Qn
=n=i
Vii
whichshould containln(ln(G))
f>
+
1)
~0-5n2ln(ln(G))
i=l
7The
statisticaldistribution
ofthe total
numberofprimefactors
of a numberN is
prime
factors
<
G.
We
alsoknow
that
n(p)
rjp/
ln(p),
which gives usp/ln(p)^0.5n2ln(ln(p)),
n pll2.
So
the
number ofiterations
ofPollard's
algorithmis
onthe
order of0(pV2)
=OiN1'4).
The Pollard Rho
algorithm canbe further
modifiedby limiting
the
number
ofiterations
ofthe
mainloop. The
moreiterations,
the
higher
the
prob-abihty
of success.Choosing
the
numberofiterations
to
be
w l.l^p1'2 yieldsapproximately
a50%
successrate,
see[14,
p.179-180].
3.3
Small Prime Trial Division
Trial
division
withthe
first 100,000
primes eliminates small primefactors
that
may
appearin
factors found
using
algorithms such asPollard
Rho.
Since
the
number of primes we areusing
is
relatively
small,
the trial
division
algorithm canbe
optimizedby
maintaining
alist
ofprimes cachedin
memory.3.4
Fermat's
Factoring
Method
The
idea
behind Fermat's
methodis
to
express a composite numberTV
asthe
difference
oftwo
squares, say,
x2y2.
In
otherwords,
if
wecan expressN
=x2-y2
=
(x-y)(x
+
y),
(4)
in
a non-trivialmanner, then
wehave
found
two
non-trivialfactors
ofN. In
orderto
arriveat an efficient algorithm we rewrite(4)
as:y2
=x2-N.
(5)
From
this
we seethat
x>
VN,
so weInitially
set x=[VN
+
lj
;
if
x2
-N
is
aperfectsquare,
afactor has
been
found;
otherwiseincrement
x andtry
again.Notice that
(x
+
1)2-N
=x2+ 2x + 1
-N
=y2+
(2x
+
1)
.So,
whenwe need
to increment x,
wecansimply
add2x
+ 1 instead
ofthe
squaring
x andsubtracting N. This
observation makesthe
algorithm more efficient.Algorithm 3.4.1
(Fermat's
Factoring Algorithm)
1.
(initialize)
m=[yN
+
1],
2.
Calculate
z=m2N
3.
If
zis
a perfectsquare, then stop
(N is
adifference
of squares)
4.
z= z+
(2m
+
1)
5.
m =771+ 1
6.
If
m>B,
then
stop.7.
Goto 3
Fermat's
algorithmis only
efficient whenN
containstwo
nearly
equalfactors.
By
reasonably
limiting
the
search,
we canoccasionally
save alot
ofcomputation
time.
3.5
Elliptical Curves Method
H. W. Lenstra
discovered
the
Elliptic
Curve
Method
(ECM)
ofinteger
fac
torization.
Lenstra
appliedPollard's p
1
method overagroup
otherthan
Mn
(the
multiplicativegroup
of allprimitiveresidue classes modn).Specif
ically,
Lenstra
usedthe
group
of rational pointson an ellipticcurve8.There
are severalforms
ofellipticcurves; the
mostcommonly
usedform
is due
to
Peter
Montgomery,
By2 =
x3
+
Ax2+
x,
with B(A2-4)
0.
By
varying
A
andB
wecan generateseveral groupsoverwhichthe
algorithmcan
be
used;
for details
onwhy
this
form is
desirable
see[3,
14].
The
algorithmfrom
this
point onis
almostidentical
to the
Pollard
P
1
algorithm.
Choose
A
andB
(there
are prescribed ways makesthese
choices)
and a rational
starting
pointP\
=(xi,yi). Now
iteratively
calculatePi
by
Pi+i
=PiPi
modN,
where
pi
is
the
ithprime ando
is
the group
composition operation.Periodi
cally
checkif 1
< gcd(a;j_|_i,
N)
<
N,
untilafactor
is
found,
or a pre-defined searchlimit is
reached.If
afactor
isn't
found,
changeA, B,
andPi,
and8Jacobi
discovered
the
remarkablefact
that
the
set of rational points on an ellipticstart again.
After
changing
curves a number oftimes,
afactor
is
usually
found.
The ECM
algorithmis
very
effective atfinding
factors
in
the
15
to
40
digit
range.3.6
Multiple Polynomial
Quadratic Sieve
The
Quadratic Sieve
algorithmdeveloped
by
C. Pomerance
[13],
depends
onfinding
non-trivial solutionsto the
Legendre
congruenceA2 = B2
mod
N.
(6)
Another,
more usefulway to
expressthis
congruenceis
A2
- B2 =
(A
-B){A
+
B)
=0
mod
N.
(7)
If
A
B
modN
andA
^
-B modN,
then
gcd(A+
B,
N)
and gcd(A-B, N)
areproperfactors
ofN
(notice
that
this
is
essentially the
sametech
nique usedin
Fermat's
method.Using
quadratic congruencesis the
basis for
nearly
all modernfactoring
algorithms(Quadratic
Sieve,
Multiple
Polyno
mial
Quadratic
Sieve,
Number
Field
Sieve,
Continued
Fractions
algorithm)
of sufficient power
to
factor
numbers without specialform
of greaterthan
30
digits).
Pomerance's
originalQuadratic Sieve
(single
polynomial)
usedthe
following
quadraticequationto
generatequadraticresidues,
Q(x)
=(x
+
floor{VN))2 -N=H2mod
N.
(8)
Pomerance
recognizedthat
using
this
polynomialto
generate asetofquadraticresidues of
N,
provides a rather niceconsequence; namely,
if
p\Q(x), then
p\Q(x+
kp)
for
allk
G
Z. To
seethis
substitute(x
+
kp)
for
xin
Q{x),
andnotice
that,
Q(x
+
kp)
=Q{x)
+
(kp)2+ 2kp(x +
floor{VN))
=0
mod p.
(9)
So,
withonly
a single solution xto
equation(8)
suchthat
p\Q{x),
othervalues
Xi
canbe found
suchthat
p\Q{xi)
by
sieving
on x(i.e.,
Xi
=xkp
Algorithm
3.6.1
(Quadratic
Sieve)91.
Select
a setof
primes calledthe
factor
base, FB,
suchthat FB
={pi\(N/pi)
=l,t
=1,2,...,B}U {Po
=-1}
(where
(N/Pi)
is the
Legendre symbol),
for
an appropriatebound
B
(choosing
an appropriatebound
B is non-trivial,
andis
notdescribed here).
The
goalhere
is
to
find
a setof
primes suchthat
Q(x)
is
ps
smooth,
i.e.,
Q(x)
canbe
factored
completely
overthe
chosenfactor
base.
2. Find the
rootsr\
andr2
of
the
polynomialQ(x)
=0 modpj,
for
allPi G
FB.
3.
Initialize
a sievearray
S[x]
=0
over someinterval
[-M, M]
for
some appropriate valueof M.
4-
Ypj
G
FB,
adding)
to the
(rj
+
kpi)
location of
S
(i.e.,
S[rj
+
kpi\
=S[rj
+
kpi]
+
ln(pi)),
wherej
G
(1,
2},
k
G
Z,
rj
+
kpt
G
[-M,
M}.
5.
Since
the
valueof
Q(x)
over[-M, M]
is approximately
My/N;
look for
sievelocations
whereS[x]
wIn
N/2 + InM.
It
is precisely
atthese
locations
that
Q(x)
may
have
fully
factored
residues,
and we performtrial
division
to
factor
Q(x),
B
Q(x)
=Y[p?i,piFB.
(10)
i=06. Let
ujj
=(ai,Q!2,
...,0.3) o,nd
Hj
=Q(x)
asdefined
in
equation(10)
.7.
Generate
B + 1 of the
factorizations
in
(6)
and create an augmented matrixM,
whereRj
=[coj\Hj]
is the
jthrow,
and reduceit
viaGaus
sian elimination overZ2.
If
alinear
dependency
existsin
M,
then
the
productof
the
vectorsin that
dependency
forms
asquare,
and constructing
a quadratic congruence(6)
is
straightforward.
The
computationaleffortrequiredto
factor
anumber withthe
Quadratic
Sieve
algorithmis
afunction
ofthe
sizeofthe
numberbeing
factored.
This
is
different
from
most classicalfactorization
methods wherethe
computational effortis
afunction
ofthe
secondlargest factor.
Since
the
computational costis
dependent
on aknown
value,
heuristics
canbe
devised
to
estimatethe
run
time
ofthe
algorithm.In
sodoing
it
doesn't
take
long
to discover that
as
TV grows,
sodo M
andthe
factor base
(as
N
increases,
Q(x)
increases
and as
Q(x)
increases
sodoes
the
valuepb
suchthat
Q(x)
is
ps
smooth).This
problemis
a significantdeficiency
in
the
algorithmwhenappliedto
sufficiently
large
numbers.Peter
Montgomery
[15]
cameup
withthe
idea
to
usemultiple polynomials ofthe
form
Q(x)
=Ax2+
Bx
+
C,
withB2-AAC
=N,
(11)
to
generatethe
desired
quadratic residues(note
that
B24AC
N is
not
arbitrary
andis
indeed necessary
to
ensure we can generate quadraticresidues,
see[15]).
Using
multiple polynomials meansthat
the
size ofthe
sieve
interval
canbe
kept
small, resulting
is
residuesthat
arein
generaleasier
to
factor. The
use of multiplepolynomials alsolends
itself
directly
to
parallel
implementations.
There
aremany
variants ofMPQS
whichoptimizedifferent
parts ofthe
algorithm.
For
a more completetreatment
ofthese
variations see[11,
4, 5,
10]. The
MPQS
was usedto
solvethe
RSA-129
challenge.3.7
Primality
Tests
3.7.1
Fermat
Probable Primes
To
test
the primality
ofdiscovered factors
(specifically
large
factors)
a version of
the
Fermat
probable primetest
was used.Each
probable prime wastested
using 100
different
bases,
sothe probability
that the
probable primesdiscovered
are compositeis unlikely
(but
ofcourse,
notimpossible).
For
details
onFermat
probable primealgorithms,
see[9,
1].
4
Recurrence Relations
Let
a\, 02,
anda^
be
integers. If
a^
^
0,
then
rn
=airn-i
+
G27"n-2
+ G3?V-3,
Vn
>
3,
along
withinitial
valuesfor
ro, r\
andr2,
is
athird
orderrecurrencerelation.To
express a secondorder recurrencerelation,
welet
03
=0
and02
7^0,
As
mentionedearlier,
the
recurrence relations consideredin
this
paperare
the
second andthird
order recurrencerelations which generatethe
Fi
bonacci,
Lucas
andTribonacci numbers,
aswellasthe
third
orderrecurrence relationdefined
by
rn
=rn_i
+
rn_3.4.1
Fibonacci Numbers
The
Fibonacci
numbersaredefined
by
the
second order recurrence relationUn
=Un-1
+
Un-2,
n>2,
(12)
where
Uq
=0,
andU\
=1.
The Fibonacci
numbers are perhapsthe
most wellknown
of allinteger
sequences.
They
make regular appearancesin
nature(pine
cones and seashells
for example), art,
architecture,
and ahost
of otherfields.
There is
also voluminous amounts ofinformation regarding
the
Fibonacci
numbers availablethat
canbe
usedto
verify
or refutethe
resultsin
this
paper10.4.1.1
Fibonacci Factorization
Algorithm
Factoring
Fibonacci
numbers canbe
simplifiedby
the
fact
that
the
greatestcommon
divisor
oftwo
Fibonacci
numbersis
the
Fibonacci
number whoseindex is
the
greatest commondivisor
ofthe
indices
ofthe
Fibonacci
numbersin question,
gcd(Um,
Un)
=cVgcd(m;n).(13)
From
this
simpleidentity
we can provethe
following
theorem.
Theorem 4.1.1
Un
=CTJJLi
Unet>
where n =ULiP?-Proof-
From
equation(13)
weknow
that
for
each ofthe
factors pe
ofn,
gCd(Un,Upei)
=Upei,
and,
gcd(Uei,Uej)
=l.
*i
Pj
Since
all ofthe
U
h arepairwiserelatively
prime and eachdivides
Un,
k
Un
=Cl[UpH,
1=1
for
some constantC.
We
can now construct an algorithmto
factor Fibonacci
numbers withcomposite
indices.
Algorithm
4.1.1
(Fibonacci
Factoring
Algorithm
1)
1.
Given
Un,
where nis
composite,
factor
ninto its
primefactorization
2.
Factor
eachU
h, usethe
factorization
if
wealready
know
it.
3.
Factor C.
Another
property
ofFibonacci
numbersthat
canbe
exploitedwhenfac
toring
is
the
identity,
U2n
=UnVn,
(14)
where
Vn
is
the
nthLucas
number.Equation
(14)
leads
to
an efficientfactoring
algorithmfor Fibonacci
numbers with evenindices.
Algorithm 4.1.2
(Fibonacci
Factoring
Algorithm
2)
1.
Given
U2n
factor
Un
andVn,
orcopy
the
factorizations
if
wealready
know
them.
The
realdifficulty
in
factoring
Fibonacci
numbersis
whenthe
index is
prime,
andthen
generalpurposefactoring
algorithms are ouronly
recourse.For
anin depth
treatment
ofthe
multiplicativestructure ofthe
Fibonacci
numbers,
see[8].
4.1.2
Results
We
successfully
factored
the
first
382 Fibonacci
numbers(plus
afew
others ofhigher
index),
andverifiedthese
factorizations
againstthe
workofBrillhart,
Montgomery
andSilverman
[8]
(this
workcontainedthe
completefactoriza
tion
of allFibonacci
numbersup to
the
388t/l).
We
alsofactored
completely
the
389t/lFibonacci number,
the
first
number notcompletely
factored
in
Brillhart, Montgomery
andSilverman's
paper.I
have
since contactedPeter
Montgomery
andreceivedan updatedtable
ofFibonacci
factorizations,
andnot
only
has
the
389t/lFibonacci
numberbeen
factored
sincethe
publicationof
the
originalpaper;
but
the
first
Fibonacci
numbernotcompletely
factored
C/703-4.2
Lucas Numbers
The
Lucas
numbers aredefined
by
the
second order recurrencerelation,
Vn
=Vn-!
+
Vn-2,
n>2,
(15)
where
V0
=2,
Vi
=1.
The
Lucas
numbers are a close cousinto the
Fibonacci
numbers.There
are
two
reasonsfor
including
them:
1)
they
canbe
usedto
aidin
the
factor
ization
ofFibonacci
numbers(see above)
and2)
they
have
wellknown
multiplicative
properties(and
existing
factorization
tables)
,providing
a meansto verify the implementation
ofthe
general purposefactoring
algorithms.4.2.1
Results
While
there
exists a useful multiplicative structureto
the
Lucas
numbers(again,
see[8]),
these
properties were not used as an aidto
factorization.
Instead only
the
general purposefactoring
algorithms at ourdisposal
wereused,
sothat
a verification of ourimplementation
couldbe
assessed.The
first
185
Lucas
numbers weresuccessfully
factored
in
less
than
anhour
ofreal
time
(half
ofthese
numberscontain20-40
digits)
.4.3
Tribonacci Numbers
The Tribonacci
numbers aredefined
by
the
third
orderrecurrence relationTn=Tn_i+Tn_2
+
T_3)
n>3,
(16)
where
T0
=0,
andT1=T2
=1.
This is
perhapsthe
most enigmatic sequence ofintegers
we considered.There is
adefinite
multiplicativestructure,
but it is
convolutedand appearsto
be
of no use as an aidin
the
factorization
of numbershigher in
the
sequence.
4.4
Results
We
successfully
factored
the
first
311 Tribonacci
numbers(as
well as afew
othersof
higher
index). To the best
ofourknowledge
this
is
the
most exten sivefactorization
ofthe Tribonacci
numbers;
we couldlocate
no references4.5
Gn
=Gn-i
+
G_3
Numbers
The
final
sequence consideredis
the
onegenerated
by
the
third
orderrecurrencerelation
Gn
=Gn-i
+
Gns,
n>
3,
(17)
where
Go
=0,
andG\
=Gi
=1-
From this
point onwe willcall
this the
G
sequence; if
aname existsfor
this
sequencealready,
noslightis intended.
Only
the
generalpurposefactoring
algorithms were appliedto
these
numbers.
4.5.1
Results
We
successfully
factored
the
first
322
numbersin this
sequence.5
Application
of
Methods
If
there
is
abest
strategy
for
factoring
arbitrarily
large
compositeintegers
without special
form,
it is
not yetknown.
However,
most researchers agreethat
the
following
set ofguidelinesworkreasonably
well,
see[8,
14]:
1.
Perform
trial
division up
to
some smalllimit.
2.
Make
sureN
passes a compositenesstest
(i.e.,
it
isn't
a probable prime).3.
Apply
Pollard's
Rho algorithm, searching
for factors
in
the
rangeof8
to
15 digits.
4. Now is
where youhope for
alittle
luck
andtry
algorithmsthat
occasionally
find large
factors,
but in
general eitherfail,
or aretoo
time
consuming
to
be
usefulin
the
general case(for-example:
Pollard's
P
1
andFermat's
algorithms).These
algorithmsshouldbe
runwithrelatively
smallbounds,
sincethey
areunlikely
to
find
afactor
in
the
general case.
5.
Use ECM
to
searchfor factors
that
arenearorbeyond
the
upperlimit
of
the
particularPollard Rho implementation
youareusing
(i.e.,
find
the
efficiency
crossover point ofthe
Pollard
Rho
andElliptic Curves
6. When
all elsefails
usethe
'big
guns:MPQS
orthe Number Field
Sieve11.
The strategy
usedto
factor
the
integers
consideredin this
paperfollows
the
recipe givenabove,
andwas asfollows:
1.
Given
a numberN
to
factor,
first
make sureN
is
not aFermat
probableprime
(repeat
this
test
onthe quotient,
any time
afactor
is
found
in
any
step).The probability
that
numberis actually
composite afterpassing
the
Fermat
probableprimetest
is
(1/4)100(see
[9,
p.379]).
2.
If
wearefactoring
Fibonacci numbers,
then
we needto
usethe
special caseFibonacci
factoring
algorithmsnow.If
we waiteduntilsome ofthe
factors
arefound
by
other algorithms(say
during
trial
division)
,then
wehave
to
sort outthe
duplicates,
sincethe
special case algorithmsinvolve copying factorization
ofpreviousFibonacci
numbers.3.
Now
performtrial
division using
the
first
100,000
primes(yes,
we usedthe
first
100,000
primes,
not allprimes under100,000).
The
limit
onthe trial
division
(pioo,ooo
=1299709)
should eliminatefor
all practical
purposesthe
needto
factor
the
factors found
by
the
remaining
algorithms.4.
Apply
Fermat's
algorithm with abound
of100,000 iterations.
This
algorithm
is extremely
fast
withsuch a smallbound,
and shouldfind
factors
that
are within a range of100,000
ofthe
square root ofthe
number weare
factoring.
5.
Pollard's Rho
algorithmis
nowrun,
withanupperbound
onthe
number
ofiterations
at100,000,
sowe shouldexpectto
find factors
in
the
6 to 11 digit
range.The
range ofdigits
we should expect comesfrom
the
fact
that
trial
division
eliminatesfactors less
than
6
digits,
andthe
maximum number ofiterations
is
ahidden
representation ofthe
square root of
the
largest
primefactor the
algorithm candetect
(refer
back
to
the closing
remarks of section3.2), i.e., 100,
0002has
11
digits.
nThe
Number Field Sieve is
the
latest,
and mostpowerful modernfactorization
algorithm.
This is
the
algorithm usedto
factor
the
RSA-130
number.This
algorithm relies6.
If
wefound
afactor
using
Pollard's Rho
algorithmin step
5,
then
goback
and continuefrom
step 4.
If
wedidn't find
afactor,
then
eitherchange
the
polynomial and returnto
step
5,
or continueif
wehave
already
changed polynomials morethan
3
times
(the
choiceto
use3
polynomialswas arbitrary).
7.
Try
Pollard's P
1
algorithm,
just in
case.8.
Onto
the
Elliptic
Curve
Method.
An
existing implementation
ofthis
algorithmwas used12
to
searchfor factors
in
the
10
to
34 digit
range.The
reasonfor
this
rangeis
simple.At
the
lower end,
the
Pollard Rho
algorithm
is
in
generalgoing
to
find factors
that
areless
than
11
digits.
The
upper endis
alimitation
ofimplementation.
9.
Now
pulloutthe
big
gun,
namely, MPQS.
It
may
seemthat
100,000
was chosenarbitrarily
asthe
bound limit for
most of
the
algorithms.There
is
a small amount oftruth
in
that,
but
the
bounds
wereactually
chosento
ensurethat
each subsequent algorithm wasnot
duplicating
a searchfor factors
ofthe
previous algorithms.In
the
case ofFermat's
algorithm,
we choosethis
bound
only to
preservethis
coincidentalsymmetry.
6
Results
Below
wepresentthe
factors found
using
each algorithm(except
trial
divi
sion)
on allthe
numbersof50
orfewer digits
in
each sequence13.
Sequence
Fibonacci
Prnh
Rho
ECM
P-l Fermat
MPQS
f"
. u
Total
Prime
42
12
0
0
0
168
222
Fibonacci*
Lucas
G
Total
90
90
Tribonacci
61
24
36
23
101
39
384
134
0
2
0
175
291
0
0
193
319
0
0
141
225
2
0
241
383
4
0
918
1440
Table 1:
factors found
by
eachalgorithm.As
the
numbersbeing
factored
increased
in size, ECM
andMPQS be
came more
dominant,
whichis
the
expected outcome.This
is
not reflectedin
the table
above sincethe
crossoverdoesn't
occuruntil around60 digits.
In
previoustrials
MPQS
startedextracting
factors
aroundthe
40
digit
range,
however,
the
data
above reflects a rather selfishECM
algorithm(which
wascontrived, in
orderto
avoid problems withthe
implementation
of some of
the
softwareroutines notimplemented
directly by
the
author)
.13In
the
following
tables,
Fibonacci*means
the
special caseFibonacci
factoring
algoNow
we presentthe
samedata
normalizedby
the
number offactors
found,
Sequence
Rho
ECM
_r?Total
Prime
Fibonacci
0.19
0.05
0.76
222
Fibonacci*
0.31
0.08
0.60
291
Lucas
0.28
0.11
0.61
319
Tribonacci
0.27
0.10
0.63
225
0.26
0.10
0.63
383
Total
0.27
0.09
0.64
1440
Table 2:
factors found
by
algorithm normalizedby
total
factors found.
At first
glancethe
numberoffactors detected
using
the
Fermat
probableprime
test may
seemsuspiciously
high, however,
once youconsiderthat the
last factor
(when N
is sufficiently
large)
willalmost alwaysbe
detected
this
way, the
numbersbecomes
much more reasonable.Approximately
30%
of allfactors
(excluding
those
found
using
trial
divi
sion)
wereextractedusing
Pollard's
Rho algorithm,
and10%
were extractedusing ECM. The
average size ofafactor
was8
digits
for Pollard Rho
and15
digits for
ECM
(this
was uniform across allfour sequences),
whichis
Avg.
Size
ofSequence
Prob.
Primes
Fibonacci
15
Lucas
13
Tribonacci
18
G
18
Table 3: Avg.
size ofProbable Primes
(50
digits
orless)
The table
above givesanindication
ofthe
average sizeofthe
largest
fac
tor
ofthe
numbersfactored
in
each sequence.It is
interesting
to
note,
that
the
average size ofthe
largest factor
in the third
order recurrencerelations,
seemto
be larger
than
for
those
ofthe
second order recurrence relations.This
result supports an observationwe made aboutthe
factors
in
the
Tri
bonacci sequence,
namely,
if
you examinethe table
offactorizations
ofthe
Tribonacci's,
it
appearsthat there
areinordinately
many
factors
that
arelarger
than
expected, assuming
aGaussian distribution
offactors.
It
seemsthat this
difference
is
not causedby
the
different
growth rates ofthe
second andthird
order recurrence relations either.We tested this
hypothesis
by
normalizing
the
data
in table 3.
We did this
by dividing by
the
average size ofthe
numbers consideredin
eachsequence, in
the
range of1-50 digits.
This
result couldbe
explainedby
the
small sample space usedin
this
experiment,
but
the
authorbelieves it is
worthinvestigating
giventhe
preliminary
evidence.
7
Platform
The
platform usedto
develop
the
software and performthe
experiments
is:
SUN Ultra
Sparc
1
(64MB
memory
and1.2G
hard
drive),
C/C++
programming
languages,
GNU
Multiple Precision Integer
library
(-lgmp).
GNU
C++
compiler,
SUN
Sparc Works C
compilerThe
algorithmsimplemented specifically
for
the
present paper are:Pollard P
-1,
Pollard
Rho,
Small
Prime Trial
Division,
Fermat's
Factoring
Method,
Special
caseFibonacci
factoring
algorithms,
Multiple Polynomial
Quadratic Sieve
(we
experimentedwithpublicly
available
implementations,
as well as ourown; the
former
provedto
be
more efficient).The
algorithmsimported
from
the
LiDIA
library
are:Ehiptical
Curves Method
Multiple Polynomial Quadratic Sieve.
The
algorithmsimported from
the
Gnu
Multiple Precision Integer
library
are:
Fermat's
Probable Prime Test
Euclid's Extended
Greatest
Common Divisor Algorithm.
8
Future Work
There
aremany
questionsI
have
that
areleft
unansweredby
this
research:1. The larger Tribonacci
numbers seemto
have
alarge
number oflarge
prime
factors.
While
this
couldbe
explainedby
randomchance,
it is
rather perplexing.
2.
Investigate
andimplement the Number
Field
Sieve
factoring
algoA
Tables
of
Factorizations
See
the
supplementthat
accompaniesthis
paperfor
the
actualfactorizations.
B
Properties Discovered
During
the
course ofanalyzing
the
factorization
tables
ofthe
Tribonacci
numbers,
severalinteresting
patterns were noticed.We
spent a considerable amount oftime
looking
for
propertiesthat
would aidin
the
factorization
ofTribonacci
numbers(in
short,
we weresearching
for
a multiplicativestructure
like
the
onein
the
Fibonacci's),
but
this
effortto
date
has
been
ofnohelp
in
this
regard14.We
present alist
ofproperties ofTribonacci
numbers with proofs:Tn+k
=Tn-2Tk
+
Tn_i(Tfe_i
+
Tfc)
+
TnTk+x,
Tn+k
=Tn+iTk
+
Tk+iTn
TnTk
+
Tn-iTk-i,
2n
nn+i
ln
+
in_i,
rp rp2 (rp rp \2 i rp2
J-2n
J-n+l
~lJn+l
1n)
Ti_i,J-2n-l
^J-n-l-Ln-2
+
J-n+J-n-li
Tn
=(1/2*)
X)
(
-1
Tn+k-ij,
n
Y,Ti
=(Tn+Tn+2-l)/2.
i=0
B.l
Proofs
Lemma B.l.l
Tn+k
=Tn-2Tk
+
Tn-i(Tfc_i
+
Tk)
+ TnTk+i.
Proof
(by
Dr.
Dan Cass).
Let
M
be
the
matrixgenerating
a shift of aTribonacci
sequence,
sothat
whenM left-multiplies
a columnvector(a,
b,
c)1the
result shouldbe
(6,
c,
a+
b
+
c)*.Then,
M
=0
1
0
0
0
1
1
1
1
14I
wouldlike
to
provide specialthanksto Dr.
Dan
Cass
andDr.
Peter
Anderson for
Now
let
Tn
be
the
nthTribonacci number;
one canthen
show viain
duction
that using the
Tribonacci
recurrencethat
wehave
the
following
expression
for
the
matrix powerMk:
Mk =
Tk-2
{Tk-z
+
Tk-2)
Tk-\
Tk-i
(Tk-2
+
Tk-i)
Tfc
Tk
{Tk-i
+
Tk)
Tk+i
Since
M
generates a shift onTn
itself
wehave
MK
Tn-2
Tn-2+k
Tn-\
=Tn-l+k
_
Tn+k
So
Tn+k
is
obtainedby
using
row3
ofMk andthe
column vector onthe
left
ofthe
above:Tn+k
Tn-2Tk
+
Tn-i(Tk-i
+
Tk)
+
TnTk+\
Lemma
B.1.2
Tn+k
=Tn+iTk
+
Tk+iTn
-TnTk
+ Tn-iTk-\.
Proof.
From
lemma
B.l.l
weknow
that
Tn+k
=Tn-2Tk
+
Tn-i(Tk-i
+
Tk)
+
TnTk+i,
now replace
Tk+i
withTk
+
Tk-\
+
2fc-2,
Tn+k
=Tn-2Tk
+
Tn-i(Tk-i
+
Tk)
+
Tn(Tk
+
Tk-\
+
Tfc-2),
=
Tk(Tn
+
Tn_i
+
Tn_2)
+
Tn-iTk-i
+
Tn(Tk-i
+
Tk-2)
=
TkTn+i
+
Tn-iTk-i
+
Tn(Tk+i
Tk)
=
Tn+iTk
+
Tk+iTn
TnTk
+
Tn-iTk-i
Lemma B.1.3
T2n
=2TnTn+i
- T2+ T2^.
Proof.
Express
T2n
asTn+n
andapply
lemma
B.l.l:
Tn+n
=Tn-2Tn
+
T_i(Tn_i
+
Tn)
+
TnTn+i,
=
(Tn+i
Tn
Tn-i)Tn
+
Tn_x
+
TnTn_i
+
TnTn+i,
=
2Tn+iTn
Tn
Tn-iTn
+
Tn_i
+
TnTn_i,
Lemma B.1.4
T2n
=T2+1
-{Tn+1
- Tn)2+
T2_v
Proof.
Express
T2n
asTn+n
andapply
lemma
B.1.2
to
getthe
result.Lemma B.1.5
T2n-i
=2Tn-iTn-2
+
T2+ T2_x.
Proof. Express
T2n_i
asTn+'n-i)
andapply lemma B.l.l:
Tn+'n-i)
=Tn-2Tn-\
+
Tn-i(Tn-2
+
Tn-\)
+
TnTn,
=
2Tn_2T7l_1+T2_1+T2.
Lemma B.1.6
?=o
Ti
={Tn
+
Tn+2
-l)/2,
n>
3.
Proof. The
readercaneasily verify
this
is
true
for
n=3.
Assume
n
J2Ti
=(Tn
+
Tn+2
-l)/2,
for
some n>
3.
i=0
Now
look
atthe
sum overthe
first
n+ 1
elements,
n+l n
2_jTi
=Tn+i
+
2_,
^t>
i=0
i=0
=
Tn+i
+
(Tn
+
Tn+2-l)/2,
=
(2Tn+i+Tn
+
Tn+2-l)/2,
=
(Tn+i
+
(Tn+2
+
Tn+1
+
Tn)
-l)/2,
=
(T+1+Tn+3-l)/2
Lemma B.1.7
Tn
=(l/2fc) fe=0
(
*
J
Tn+k-j,
for
allfc
>
1.
Proof.
We
shall provethis
lemma
by
induction.
The
base
case(A;
=1).
Tn
=(Tn_3
+
Tn+i)/2,
is
immediately
obvious.Now
supposeTn
=(1/2*)
Observe
that the
base
case gives usthe
following,
Tn+k-Aj
=(Tn+k-4j-3
+Tn+k-4j+i)/2.
Substituting
the
above expression we getTn
=(1/2
) 22
I
J
(Tn+fe_4j_3
+
Tn+k-4j+i)
3=0 \J
J
2
+
Tn
=^2
(
j
J
Tn+k-4j-3
+
]T)
(
j
j
Tn+k-4j+l
Now
wereplace-4j-3
with
fe+i
sC)w
2^
[j
_1
J
i+*-4j+l
to
getfe+i
/ , \k
/,
\2*+1Tra
=XI
(
_1
)
Tn+k-ij+l
+
Y2
(
j
T"+A:-4j+l
Rewriting
the
summationssothat
wehave
the
samebounds
for
eachweget,
k
2k+lTn
=I
n
J
in+t+l
"t-7^ I
1J
J-n+k-ij+l
Tn+k+1
+
22
[
j
_1
)
^ra+A:-+
H
(
j
)
Tn+fe-4j+l
+
(
k
J
Tn+k-4(k+l)+l-2k^Tn
=r0)Tn+k+1
+
l:^)
+
(*)>W^
+
(
k
j
^n+fc-4(fe+l)+l-Now
we get abit
clever and noticethat
we can makethe
following
substitutions
in the
equation
above:(!)
ft1)-(8
(-)
(AM3
-er)
and
arrive
atk+lrp
kfk
+
l\
^^fk+l\rp
V
/
+k+1
^
V
j
)
ln+k~ii+1>
+
I
k
+ 1
J
Tn+ifc-4(A;+l)+l.
which
is the
same as2
T
=IJ
(
j
J
Tn+fe-4j+l-Indeed,
this
provesthe
lemma.
The
following
lemmas
canbe easily
provenusing
the
aboveresults,
specifically
lemma
B.1.3
andlemma
B.1.5;
the
proofs arelittle
morethan
exercisesin
algebraic manipulation.Lemma B.1.8
If
Tn
=aah
andTn_i
=aa-1b2,
then
Tnk
=aab3
andTnk_1
=aa-lbA,yk>l.Lemma B.1.9
Suppose
n =2kw,
where wis
odd andk
>
3.
Then
Tn
=2k~1C,
whereC
is
odd.While lemma B.1.8
andlemma
B.1.9
couldpotentially
aidin
the
fac
torization
ofTribonacci numbers, it is
an unfortunatetruth that the
only
factors
that
follow
this
pattern are small.An
interesting
property
ofthe Tribonacci
numbers wediscovered
(al
though
again, nearly
uselessin
terms
offactorization)
is,
2711 I rp
|
-*2niand,
271 I rp
I
J-2n-li
for
some constantsCI
andC2.
This
resultsfollow
directly
from lem