Solving Pell s Equation with Fibonacci s Rabbits Teacher s Circle, October 2009 Aaron Bertram, University of Utah

Similar documents
Archimedes Cattle Problem

Pell s Equation Claire Larkin

Archimedes' Cattle Problem

Pell's Equation. Luke Kanczes

A SIMPLE SOLUTION TO ARCHIMEDES CATTLE PROBLEM

Some Congruence Properties of Pell's Equation

MATH NUMBER THEORY SPRING Scientia Imperii Decus et Tutamen 1

10.1 Radical Expressions and Functions Math 51 Professor Busken

Grade 8 Chapter 7: Rational and Irrational Numbers

MATH NUMBER THEORY SPRING Scientia Imperii Decus et Tutamen 1

One-to-one functions and onto functions

Notes on Continued Fractions for Math 4400

22. RADICALS. x add 5. multiply by 7

What is proof? Lesson 1

Square-Triangular Numbers

CHAPTER 1 NUMBER SYSTEMS. 1.1 Introduction

Cantor and Infinite Sets

3.4 Pascal s Pride. A Solidify Understanding Task

UNC Charlotte 2004 Algebra with solutions

Graphing Radicals Business 7

No, not the PIE you eat.

CH 59 SQUARE ROOTS. Every positive number has two square roots. Ch 59 Square Roots. Introduction

= 5 2 and = 13 2 and = (1) = 10 2 and = 15 2 and = 25 2

Algebra & Trig Review

Table of Contents. 2013, Pearson Education, Inc.

Algebra. Table of Contents

Chapter 1: January 26 January 30

Example. How to Guess What to Prove

Math 3361-Modern Algebra Lecture 08 9/26/ Cardinality

Chapter 8B - Trigonometric Functions (the first part)

What can you prove by induction?


25. REVISITING EXPONENTS

Chapter 1A -- Real Numbers. iff. Math Symbols: Sets of Numbers

Prentice Hall: Algebra 2 with Trigonometry 2006 Correlated to: California Mathematics Content Standards for Algebra II (Grades 9-12)

Unit 4 Patterns and Algebra

The Fibonacci Sequence

Sequences and Summations. CS/APMA 202 Rosen section 3.2 Aaron Bloomfield

Population Models Part I

Grade 7/8 Math Circles. Mathematical Thinking

2. Limits at Infinity

Numbers. The aim of this lesson is to enable you to: describe and use the number system. use positive and negative numbers

SEVENTH EDITION and EXPANDED SEVENTH EDITION

Unit 2-1: Factoring and Solving Quadratics. 0. I can add, subtract and multiply polynomial expressions

MATH NUMBER THEORY SPRING Scientia Imperii Decus et Tutamen 1

from Euclid to Einstein

GROUP ROUND INSTRUCTIONS

BRITISH COLUMBIA SECONDARY SCHOOL MATHEMATICS CONTEST, 2017 Junior Preliminary Problems & Solutions

College Algebra Through Problem Solving (2018 Edition)

Park Forest Math Team. Meet #3. Self-study Packet

Ohio s State Tests ITEM RELEASE SPRING 2017 GRADE 8 MATHEMATICS

Radical Expressions and Functions What is a square root of 25? How many square roots does 25 have? Do the following square roots exist?

Lesson 21 Not So Dramatic Quadratics

Notes: Pythagorean Triples


CHINO VALLEY UNIFIED SCHOOL DISTRICT INSTRUCTIONAL GUIDE ALGEBRA II

Core Connections Algebra 2 Checkpoint Materials

Exponents and Logarithms

SUMMER MATH PACKET. Geometry A COURSE 227

Exploring Number Theory via Diophantine Equations

The Basics COPYRIGHTED MATERIAL. chapter. Algebra is a very logical way to solve

Honors Advanced Algebra Unit 2 Polynomial Operations September 14, 2016 Task 7: What s Your Identity?

1 Continued Fractions

Algebra 2 (2006) Correlation of the ALEKS Course Algebra 2 to the California Content Standards for Algebra 2

Algebraic expression is formed from variables and constants using different operations. NCERT

Topic 1: Fractional and Negative Exponents x x Topic 2: Domain. 2x 9 2x y x 2 5x y logg 2x 12

Contents. Test-Taking Tips... 8

2.1 The Complex Number System

11.3 Solving Radical Equations

Notice how these numbers thin out pretty quickly. Yet we can find plenty of triples of numbers (a, b, c) such that a+b = c.

Algebra 2 Secondary Mathematics Instructional Guide

Quarter 2 400, , , , , , ,000 50,000

MTH 05 Lecture Notes. Andrew McInerney

Chapter 9: Roots and Irrational Numbers

ACCUPLACER MATH 0311 OR MATH 0120

Chapter 1. Foundations of GMAT Math. Arithmetic

MAT12X Intermediate Algebra

Euclidean Space. This is a brief review of some basic concepts that I hope will already be familiar to you.

RMT 2014 Power Round February 15, 2014

Positive exponents indicate a repeated product 25n Negative exponents indicate a division by a repeated product

Please bring the task to your first physics lesson and hand it to the teacher.

Module 2, Section 2 Solving Equations

CHAPTER 1 REAL NUMBERS KEY POINTS

Fibonacci mod k. In this section, we examine the question of which terms of the Fibonacci sequence have a given divisor k.

KINDERGARTEN Correlation of Project Learning Tree s PreK 8 Environmental Education Activity Guide with the Common Core Standards for Mathematics

Introduction. So, why did I even bother to write this?

Instructors Manual Algebra and Trigonometry, 2e Cynthia Y. Young

Grade 6 Math Circles October 5, 2011 Simplifying Equations

CONTENTS NUMBER SYSTEMS. Number Systems

Ritangle - an A Level Maths Competition 2016

COLLEGE ALGEBRA. Paul Dawkins

Number Theory in Problem Solving. Konrad Pilch

Section 8.2: Integration by Parts When you finish your homework, you should be able to

Some Highlights along a Path to Elliptic Curves

MATH141: Calculus II Exam #4 review solutions 7/20/2017 Page 1

Algebra. Here are a couple of warnings to my students who may be here to get a copy of what happened on a day that you missed.

Ordinary Differential Equations Prof. A. K. Nandakumaran Department of Mathematics Indian Institute of Science Bangalore

Check boxes of Edited Copy of Sp Topics (was 217-pilot)

ABE Math Review Package

NOTES: Chapter 11. Radicals & Radical Equations. Algebra 1B COLYER Fall Student Name:

Transcription:

Solving Pell s Equation with Fibonacci s Rabbits Teacher s Circle, October 2009 Aaron Bertram, University of Utah Pell s Equation was a recurring theme in the development of number theory, predating the British mathematician John Pell (1611-1685) by several thousand years (and anyway Pell was wrongly credited with solving it, so the attribution is a total mess). The equation is: (1) y 2 = dx 2 + 1 when d > 1 is a (fixed) natural number that is *not* a perfect square. The graph of this equation in the plane is a hyperbola, of course, but the challenge is to find pairs of positive integers (x, y) that solve (1), or, in other words, to find points on the hyperbola that have integer coordinates (and lie in the first quadrant). Examples: (a) When d = 2, the pair (x, y) = (2, 3) is a solution. 9 = 8 + 1; 3 2 = 2(2 2 ) + 1 (b) Devise a trial-and-error method to search for solutions and use it to find a solution when d = 3, 5, 6, 7. (c) Find a different solution to the one above when d = 2. (d) When d is a perfect square, there are no integer solutions. Why? Fact: Any one solution can be used to generate infinitely many others. Think of y 2 dx 2 as a difference of squares and factor: y 2 dx 2 = y 2 (x d) 2 = (y x d)(y + x d) (giving the hyperbola s asymptotes). Pell s equation becomes: (y x d)(y + x d) = 1 If (x 1, y 1 ) is one solution, then we can raise both sides of: to any power n, and get: (y 1 x 1 d)(y1 + x 1 d) = 1 (y 1 x 1 d) n (y 1 + x 1 d) n = 1 n = 1 These give new solutions, because there is a pair (x n, y n ) so that: (y x d) n = y n x n d and (y + x d) n = y n + x n d 1

2 Example: (a) Start from the solution (2, 3) to Pell s equation: Square both sides: 3 2 2(2 2 ) = (3 2 2)(3 + 2 2) = 1 (3 2 2) 2 = (9 12 2 + 8) = (17 12 2) (3 + 2 2) 2 = (9 + 12 2 + 8) = (17 + 12 2) so (12, 17) is another solution! (Check: 17 2 = 289 = 2(144) + 1) Or cube both sides: (3 2 2) 3 = (27 54 2 + 72 16 2) = 99 70 2 (3 + 2 2) 3 = (27 + 54 2 + 72 16 2) = 99 + 70 2 and (70, 99) is another solution! (Check: 99 2 = 9801 = 2(4900) + 1) (Do the kids calculators make this easy to do?) (b) Find second (and third) solutions when d = 3, 5, 6, 7. An Application: Triangle vs Square Numbers. We teach about square numbers: and about triangle numbers: 1, 4, 9, 16, 25, 36, 49,..., n 2,... 1, 3, 6, 10, 15, 21, 28, 36, 45,..., m(m + 1)/2,... and you may have noticed that: 1 and 36 are simultaneously square and triangle numbers Question: Are there any other square/triangle numbers? Some Algebra: m(m + 1)/2 = n 2 4m 2 + 4m = 8n 2 (2m + 1) 2 1 = 2(2n) 2 (2m + 1) 2 = 2(2n) 2 + 1 y 2 = 2x 2 + 1 (x = 2n, y = 2m + 1) Pell s equation! Let s look at the solutions we ve found so far: (x, y) = (2, 3) (m, n) = (1, 1); 1 2 = 1 (x, y) = (12, 17) (m, n) = (8, 6); 6 2 = 36 (x, y) = (70, 99) (m, n) = (48, 35); 35 2 = 1225 and of course we can now find as many others as we want!

Variation on the Application. Instead, suppose we ask for: Triangle numbers that are 3 times a perfect square. The algebra: m(m + 1)/2 = 3n 2 4m 2 + 4m = 24n 2 (2m + 1) 2 1 = 6(2n) 2 (2m + 1) 2 = 6(2n) 2 + 1 y 2 = 6x 2 + 1 (x = 2n, y = 2m + 1) This is Pell s equation for d = 6. Of course, you can replace 3 by (almost any) number k, and then: Triangle numbers that are k times a perfect square. come from solutions to Pell s equation: y 2 = 2kx 2 + 1 The Archimedes Cattle Problem was a very famous example of this (see the Appendix). After the dust clears, the second part of the cattle problem, which is required if thou shalt be numbered among the wise requires finding a triangle number that is: k = 51285802909803 times a perfect square. The smallest such number has 206, 545 digits! Although a method was devised in 1880 by a German mathematician named Amthor for finding the answer in principle, it was assumed that it would never be found in practice. In fact, a letter to the New York Times in 1931 stated: Since it has been calculated that it would take the work of a thousand men for a thousand years to determine the complete number, it is obvious that the world will never have a complete solution. My how times have changed! You can see the complete answer at: www.cs.drexel.edu/ crorres/archimedes/cattle/computer2/computer output.html 3

4 So What About the Rabbits? In the late 1657, Fermat issued a challenge to the mathematicians across the channel to solve the simple equations: y 2 = 61x 2 + 1 and y 2 = 109x 2 + 1 which were chosen so that they wouldn t cause too much trouble. Quite on the contrary, they were chosen with care to have solutions that were far too large to be found by trial-and-error. Turns out there is a much more efficient way to solve Pell s equation. Continued Fractions. Here is a rather nonstandard introduction to the subject of continued fractions. Let s start with Fibonacci s rabbits. Recall that the Fibonacci sequence: is defined inductively by: F 1 = 1, 1, 1, 2, 3, 5, 8, 13, 21, 34,... F 0 = 1 and F n+1 = F n + F n 1 Alternatively, we can start with one pair of two-year-old rabbits, and another pair of one-year-old rabbits. Each year, each pair of rabbits has a pair of offspring (of opposite sexes), and, alas, the two-year-olds die. Thus in year one, the number of pairs of newborn rabbits is: F 1 = 1 + 1 = 2 and, alas, the two-year olds die off. In the year two, the number of newborn rabbits is: F 2 = 1 + 2 = 3 and, alas, the two-year-olds die off again. Now suppose instead that we start with only one pair of one-year-old rabbits (and no two-year-olds). We ll call these the Montague rabbits. They will reproduce according to: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34,... On the other hand, the Capulet rabbits will start as one pair of two-year-olds (and no one-year-olds). They will reproduce according to: 1, 0, 1, 1, 2, 3, 5, 8, 13, 21,... (one step behind the Montagues). Then the ratio of Montagues to Capulets in each year starting with year one will be: 1/1, 2/1, 3/2, 5/3, 8/5, 13/8, 21/13, 34/21,...

Getting out your calculators, you will see that these ratios approach the golden ratio: 1 + 5 1.618034... 2 This may have been familiar to you already. The next wrinkle may not be. Suppose that we reprogram our Montague and Capulet rabbits as follows. The two-year-old rabbits will have one pair of offspring as before (and then die, as before). But the one-year-olds will have babies according to a rule that we set forth. This rule will look like an infinite string of integer instructions to the rabbits. The golden ratio instructions were: 1, 1, 1, 1, 1,... telling each pair of one-year-olds that they need to have one pair of offspring. But suppose the instructions are instead: 1, 2, 2, 2, 2,... telling the one-year-olds in year one to have only one pair of offspring, but all the subsequent one-year-olds to have two. Then the Montagues and Capulets will multiply quite differently. First the Montagues: and then the Capulets: 0, 1, 1, 3, 7, 17, 41, 99,... 1, 0, 1, 2, 5, 12, 29, 70,... Now look at the ratios of these reprogrammed rabbits: 1/1, 3/2, 7/5, 17/12, 41/29, 99/70,... Notice two things. First, these ratios are approaching the square root of two: 2 1.414214 and second, every other one of these ratios solves Pell s equation! Note: If you are tired of the rabbits, you can say that the set of instructions is a sequence of whole numbers: a 1, a 2, a 3, a 4,... and that the corresponding inductive rules are: F n+1 = a n F n + F n 1 Examples: Try out the following rabbit instructions: (a) 1, 1, 2, 1, 2, 1, 2, 1, 2,... (b) 2, 4, 4, 4, 4, 4, 4,... (c) 2, 1, 1, 1, 4, 1, 1, 1, 4,... 5

6 Turns out that: Fact 1. Every (positive) real number α has an instruction set with the property that the rabbit ratios approach α. The instruction set may be calculated inductively from α as follows: α 1 = α, a 1 = α 1 α 2 = 1/(α 2 α 1 ), a 2 = α 2 α 3 = 1/(α 3 α 2 ), a 3 = α 3 etc. (this is easy to implement on your calculator!) Fact 2.The instruction sets for rational numbers are finite. Fact 3. The instruction sets for any d is infinite repeating, and moreover looks like: d, palindrome, 2 d, palindrome, 2 d,... where palindrome is, literally, a palindrome of instructions. Examples: 19 instructions: 4, 2, 1, 3, 1, 2, 8, 2, 1, 3, 1, 2, 8,... 21 instructions: 4, 1, 1, 2, 1, 1, 8, 1, 1, 2, 1, 1, 8,... 61 instructions: 7, 1, 4, 3, 1, 2, 2, 1, 3, 4, 1, 14, 1, 4, 3, 1, 2, 2, 1, 3, 4, 1, 14,... These can all be calculated by hand using the rules for radicals. And finally, the punchline. Theorem: The rabbit ratio for the instruction set associated to d solves Pell s equation: (a) Just before each big 2 d instruction if the palindrome has odd length, (b) Just before every second big instruction if the palindrome has even length. Thus, to solve Archimedes cattle problem, all you have to do(!) is figure out the palindrome for: and then let the rabbits multiply! d = 2(51285802909803)

Appendix. Archimedes Cattle Problem. If thou art diligent and wise, O stranger, compute the number of cattle of the Sun, who once upon a time grazed on the fields of the Thrinacian isle of Sicily, divided into four herds of different colours, one milk white, another a glossy black, a third yellow and the last dappled. In each herd were bulls, mighty in number according to these proportions: Understand, stranger, that the white bulls were equal to a half and a third of the black together with the whole of the yellow, while the black were equal to the fourth part of the dappled and a fifth, together with, once more, the whole of the yellow. Observe further that the remaining bulls, the dappled, were equal to a sixth part of the white and a seventh, together with all of the yellow. These were the proportions of the cows: The white were precisely equal to the third part and a fourth of the whole herd of the black; while the black were equal to the fourth part once more of the dappled and with it a fifth part, when all, including the bulls, went to pasture together. Now the dappled in four parts were equal in number to a fifth part and a sixth of the yellow herd. Finally the yellow were in number equal to a sixth part and a seventh of the white herd. If thou canst accurately tell, O stranger, the number of cattle of the Sun, giving separately the number of well-fed bulls and again the number of females according to each colour, thou wouldst not be called unskilled or ignorant of numbers, but not yet shalt thou be numbered among the wise. But come, understand also all these conditions regarding the cattle of the Sun. When the white bulls mingled their number with the black, they stood firm, equal in depth and breadth, and the plains of Thrinacia, stretching far in all ways, were filled with their multitude. Again, when the yellow and the dappled bulls were gathered into one herd they stood in such a manner that their number, beginning from one, grew slowly greater till it completed a triangular figure, there being no bulls of other colours in their midst nor none of them lacking. If thou art able, O stranger, to find out all these things and gather them together in your mind, giving all the relations, thou shalt depart crowned with glory and knowing that thou hast been adjudged perfect in this species of wisdom. Shamelessly copied from www.cs.drexel.edu/ crorres/archimedes/cattle/statement.html, who in turn got it from Greek Mathematical Works (Translated by Ivor Thomas) The Loeb Classical Library, Harvard University Press, Cambridge, MA, 1941 7