A new algorithm for generating Pythagorean triples

Similar documents
Math 135 Circles and Completing the Square Examples

Polynomial Functions. Polynomial functions in one variable can be written in expanded form as ( )

EQUATIONS OF LINES AND PLANES

MATH 150 HOMEWORK 4 SOLUTIONS

Example 27.1 Draw a Venn diagram to show the relationship between counting numbers, whole numbers, integers, and rational numbers.

Factoring Polynomials

Binary Representation of Numbers Autar Kaw

SPECIAL PRODUCTS AND FACTORIZATION

RIGHT TRIANGLES AND THE PYTHAGOREAN TRIPLETS

Vectors Recap of vectors

Mathematics. Vectors. hsn.uk.net. Higher. Contents. Vectors 128 HSN23100

4.11 Inner Product Spaces

PROF. BOYAN KOSTADINOV NEW YORK CITY COLLEGE OF TECHNOLOGY, CUNY

Babylonian Method of Computing the Square Root: Justifications Based on Fuzzy Techniques and on Computational Complexity

Appendix D: Completing the Square and the Quadratic Formula. In Appendix A, two special cases of expanding brackets were considered:

Reasoning to Solve Equations and Inequalities

Regular Sets and Expressions

and thus, they are similar. If k = 3 then the Jordan form of both matrices is

Geometry 7-1 Geometric Mean and the Pythagorean Theorem

All pay auctions with certain and uncertain prizes a comment

9 CONTINUOUS DISTRIBUTIONS

Graphs on Logarithmic and Semilogarithmic Paper

Homework 3 Solutions

Basic Analysis of Autarky and Free Trade Models

Novel Methods of Generating Self-Invertible Matrix for Hill Cipher Algorithm

Econ 4721 Money and Banking Problem Set 2 Answer Key

Integration. 148 Chapter 7 Integration

FUNCTIONS AND EQUATIONS. xεs. The simplest way to represent a set is by listing its members. We use the notation

Integration by Substitution

Experiment 6: Friction

Solving BAMO Problems

How To Understand The Theory Of Inequlities

Lecture 5. Inner Product

5.2. LINE INTEGRALS 265. Let us quickly review the kind of integrals we have studied so far before we introduce a new one.

Use Geometry Expressions to create a more complex locus of points. Find evidence for equivalence using Geometry Expressions.

Second-Degree Equations as Object of Learning

Distributions. (corresponding to the cumulative distribution function for the discrete case).

LINEAR TRANSFORMATIONS AND THEIR REPRESENTING MATRICES

Section 7-4 Translation of Axes

Section 5-4 Trigonometric Functions

Or more simply put, when adding or subtracting quantities, their uncertainties add.

Pentominoes. Pentominoes. Bruce Baguley Cascade Math Systems, LLC. The pentominoes are a simple-looking set of objects through which some powerful

4 Approximations. 4.1 Background. D. Levy

The Velocity Factor of an Insulated Two-Wire Transmission Line

MODULE 3. 0, y = 0 for all y

PHY 140A: Solid State Physics. Solution to Homework #2

6.2 Volumes of Revolution: The Disk Method

Hillsborough Township Public Schools Mathematics Department Computer Programming 1

1.2 The Integers and Rational Numbers

Physics 43 Homework Set 9 Chapter 40 Key

Example A rectangular box without lid is to be made from a square cardboard of sides 18 cm by cutting equal squares from each corner and then folding

CHAPTER 11 Numerical Differentiation and Integration

#A12 INTEGERS 13 (2013) THE DISTRIBUTION OF SOLUTIONS TO XY = N (MOD A) WITH AN APPLICATION TO FACTORING INTEGERS

Vectors. The magnitude of a vector is its length, which can be determined by Pythagoras Theorem. The magnitude of a is written as a.

Online Multicommodity Routing with Time Windows

Algebra Review. How well do you remember your algebra?

Chapter 2 The Number System (Integers and Rational Numbers)

On the Robustness of Most Probable Explanations

Thinking out of the Box... Problem It s a richer problem than we ever imagined

SINCLAIR COMMUNITY COLLEGE DAYTON, OHIO DEPARTMENT SYLLABUS FOR COURSE IN MAT COLLEGE ALGEBRA (4 SEMESTER HOURS)

Rate and Activation Energy of the Iodination of Acetone

An Undergraduate Curriculum Evaluation with the Analytic Hierarchy Process

Pure C4. Revision Notes

19. The Fermat-Euler Prime Number Theorem

Decision Rule Extraction from Trained Neural Networks Using Rough Sets

ORBITAL MANEUVERS USING LOW-THRUST

Operations with Polynomials

Regular Languages and Finite Automata

6 Energy Methods And The Energy of Waves MATH 22C

A new generalized Jacobi Galerkin operational matrix of derivatives: two algorithms for solving fourth-order boundary value problems

Module Summary Sheets. C3, Methods for Advanced Mathematics (Version B reference to new book) Topic 2: Natural Logarithms and Exponentials

Why is the NSW prison population falling?

Euler Euler Everywhere Using the Euler-Lagrange Equation to Solve Calculus of Variation Problems

Lecture 3 Gaussian Probability Distribution

5.6 POSITIVE INTEGRAL EXPONENTS

PHY 222 Lab 8 MOTION OF ELECTRONS IN ELECTRIC AND MAGNETIC FIELDS

AREA OF A SURFACE OF REVOLUTION

Value Function Approximation using Multiple Aggregation for Multiattribute Resource Management

9.3. The Scalar Product. Introduction. Prerequisites. Learning Outcomes

Brillouin Zones. Physics 3P41 Chris Wiebe

addition, there are double entries for the symbols used to signify different parameters. These parameters are explained in this appendix.

15.6. The mean value and the root-mean-square value of a function. Introduction. Prerequisites. Learning Outcomes. Learning Style

Linear Equations in Two Variables

Solution to Problem Set 1

Module 2. Analysis of Statically Indeterminate Structures by the Matrix Force Method. Version 2 CE IIT, Kharagpur

Fast Demand Learning for Display Advertising Revenue Management

Treatment Spring Late Summer Fall Mean = 1.33 Mean = 4.88 Mean = 3.

Simulation of operation modes of isochronous cyclotron by a new interative method

Second Term MAT2060B 1. Supplementary Notes 3 Interchange of Differentiation and Integration

LECTURE #05. Learning Objective. To describe the geometry in and around a unit cell in terms of directions and planes.

Unit 6: Exponents and Radicals

Economics Letters 65 (1999) macroeconomists. a b, Ruth A. Judson, Ann L. Owen. Received 11 December 1998; accepted 12 May 1999

Optiml Control of Seril, Multi-Echelon Inventory (E&I) & Mixed Erlng demnds

COMPARISON OF SOME METHODS TO FIT A MULTIPLICATIVE TARIFF STRUCTURE TO OBSERVED RISK DATA BY B. AJNE. Skandza, Stockholm ABSTRACT

Design Example 1 Special Moment Frame

Real Time Robust L1 Tracker Using Accelerated Proximal Gradient Approach

NOTES. Cohasset Associates, Inc Managing Electronic Records Conference 8.1

1. Find the zeros Find roots. Set function = 0, factor or use quadratic equation if quadratic, graph to find zeros on calculator

Radius of the Earth - Radii Used in Geodesy James R. Clynch February 2006

Transcription:

A new lgorithm for generting Pythgoren triples RH Dye 1 nd RWD Nicklls 2 The Mthemticl Gzette (1998); 82 (Mrch, No. 493), p. 86 91 (JSTOR rchive) http://www.nicklls.org/dick/ppers/mths/pythgtriples1998.pdf 1 Introduction The following observtion by one of us (RWDN) rose while investigting Pythgoren triples (x, y, z) with y = x + 1, nd led to some interesting reltionships which llow Pythgoren triples to be generted itertively. In this rticle we obtin these nd other lgorithms which, s fr s we re wre, hve not been described before. In ddition we show tht some relted reltionships recently described by Htch (1995) nd by Mills (1996) re consequence of these lgorithms. Let z = y + b. So x 2 + y 2 = (y + b) 2, nd hence y = (x 2 b 2 )/2b. The triple cn therefore be expressed s ( x 2 b 2 ) x,, 2b Let y = x +. So x + = (x 2 b 2 )/2b nd thus ( x 2 + b 2 2b ). x 2 2bx (b 2 + 2b) = 0. (1) 2 Triples with y = x + 1 In this cse we hve = 1, nd eqution 1 becomes If, lso, b = 1 then eqution 2 becomes x 2 2bx (b 2 + 2b) = 0. (2) x 2 2x 3 = (x 3)(x + 1) = 0. It follows tht the two roots 3, 1 of this qudrtic generte the triples 3,4,5 nd 1, 0, 1 respectively. 1 Deprtment of Mthemtics nd Sttistics, University of Newcstle-upon-Tyne, Newcstle-upon-Tyne, UK. 2 Deprtment of Anesthesi, Nottinghm University Hospitls, City Hospitl Cmpus, Nottinghm, UK. emil: dick@nicklls.org

RH Dye & RWD Nicklls The Mthemticl Gzette (1998); 82, 86 91 2 In order to generte the next triple in the = 1 sequence (ie. y = x + 1) using eqution 2 it is necessry to know the next vlue of b. Now the next triple in the = 1 sequence is 20,21,29, for which b = 8. Since 8 = 3 + 5 the reltionship b n+1 = X n + Z n suggested itself s possibility to be explored for determining subsequent vlues of b, where X n,y n,z n represent the n th Pythgoren triple of sequence. Using this nottion, b 2 = 3 + 5 = 8, nd eqution 2 becomes x 2 16x 80 = (x 20)(x + 4) = 0, which genertes the second = 1 triple 20,21,29. The first four triples in the = 1 sequence cn be generted using eqution 2 s follows: b 1 = 1 x 2 2x 3 = 0 = (x 3)(x + 1) 3, 4, 5 b 2 = 3 + 5 x 2 16x 80 = 0 = (x 20)(x + 4) 20, 21, 29 b 3 = 20 + 29 x 2 98x 2499 = 0 = (x 119)(x + 21) 119, 120, 169 b 4 = 119 + 169 x 2 576x 83520 = 0 = (x 696)(x + 120) 696, 697, 985 When the working is lid out like this cler pttern emerges which fcilittes fctoristion, nmely tht for the cse where y = x + 1 then (x +Y n 1 ) is fctor, nd eqution 2 fctorises s follows: x 2 2b n x (b n 2 + 2b n ) = (x X n )(x +Y n 1 ) = 0. In view of these interesting heuristic reltionships more systemtic pproch ws explored which led to solution vi Pell s eqution (see Dvenport, 1970), which we now present. 3 Triples where is constnt Consider the triple X,Y,Z where Y = X + ( > 0). Then Expnding nd doubling both sides gives X 2 + (X + ) 2 = Z 2. 4X 2 + 4X + 2 2 = 2Z 2, i.e. (2X + ) 2 + 2 = 2Z 2, ( ) 2X + 2 ( ) Z 2 i.e. + 1 = 2. Write (2X + )/ = U nd Z/ = T. Then U 2 + 1 = 2T 2. If = 1 then we hve n eqution in integers (U,T Z), nd therefore this is cse of Pell s eqution for which it is known tht the n th solution U n, T n in positive integers is given by U n + T n 2 = (1 + 2) 2n 1.

RH Dye & RWD Nicklls The Mthemticl Gzette (1998); 82, 86 91 3 Thus U n+1 + T n+1 2, = (1 + 2) 2(n+1) 1, Equting 2 nd non- 2 prts gives = (1 + 2) 2 (1 + 2) 2n 1, = (1 + 2) 2 (U n + T n 2), = (3 + 2 2)(U n + T n 2), = (3U n + 4T n ) + (2U n + 3T n ) 2. T n+1 = 2U n + 3T n, (3) U n+1 = 3U n + 4T n. (4) Although these recurrence reltions hve been reched using Pell s eqution for integers, we wish to highlight the following observtion. Suppose tht U n, T n re determined recursively by equtions 3 nd 4, whether or not they re integers. Then direct clcultion gives 2T 2 n+1 U 2 n+1 = 2(2U n + 3T n ) 2 (3U n + 4T n ) 2, = 2T n 2 U n 2. Thus, provided 2T 2 1 U 2 1 = 1, the pirs U n, T n re solutions of 2T 2 U 2 = 1, whether or not U 1, T 1 re integers. Substituting for T nd U with T = Z/ nd U = (2X + )/ in equtions 3 nd 4 (bering in mind tht the full set of Pythgoren triple solutions is given only for the cse where = 1) gives respectively ( Zn+1 ) = 2 ( 2Xn + ) ( ) 3Zn +, nd which reduce to ( 2Xn+1 + ) = 3 ( 2Xn + ) ( ) 4Zn +, Z n+1 = 4X n + 3Z n + 2, (5) X n+1 = 3X n + 2Z n +. (6) Since Y n = X n + we cn rerrnge eqution 6 to obtin X n+1 = 2(X n + Z n ) +Y n. (7) Subtrcting eqution 6 from eqution 5 gives Z n+1 X n+1 = Z n + X n +, i.e. b n+1 + = Z n + X n +, i.e. b n+1 = Z n + X n, (8) the reltionship conjectured bove in Section 2.

RH Dye & RWD Nicklls The Mthemticl Gzette (1998); 82, 86 91 4 4 Triples where b is constnt Similr reltionships cn be obtined for the cse where b is constnt, s follows: n+1 = X n +Y n, (9) X n+1 = X n + 2b, (10) Y n+1 = 2X n +Y n + 2b, (11) Z n+1 = 2X n + Z n + 2b. (12) We leve it to the interested reder to verify tht these do give sequence of triples, nd tht in this cse eqution 1 fctorises s follows: x 2 2bx (b 2 + 2b n ) = (x X n )(x + X n 1 ) = 0. 5 Conclusion We hve therefore shown tht the following reltionships generte Pythgoren triples X,Y,Z For =constnt (X n + = Y n ) { Xn+1 = 3X n + 2Z n +, b n+1 = X n + Z n. For b =constnt (Z n = Y n + b) { Zn+1 = 2X n + Z n + 2b, n+1 = X n +Y n. In the specil cses = 1 ( = constnt) nd b = 1 (b = constnt) then the bove recurrence reltionships generte ll the relevnt corresponding Pythgoren triples. However, for ll other cses the bove reltionships necessrily give only some of the triples, since the recurrence reltions (equtions 3 nd 4) do not, from ny initil U 1, T 1 generte ll frctionl solutions of Pell s eqution. A significnt feture of these lgorithms is tht if the initil triple is primitive, then every member of the generted sequence is lso primitive. For exmple, consider the = constnt cse. Suppose h X n+1 nd h Y n+1, then h 2 (X 2 n+1 +Y 2 n+1 ), nd hence h Z n+1. Also, h (Y n+1 X n+1 ), nd so h. From equtions 5 nd 6 it follows tht h (4X n + 3Z n ) nd h (3X n + 2Z n ); by tking liner combintions of these we see tht h Z n nd h X n, from which it follows tht h Y n, s Y n = X n +. It follows, therefore, tht if the triple X n+1, Y n+1, Z n+1 is not primitive, then neither is X n, Y n, Z n ; nd so on down to X 1, Y 1, Z 1. A similr rgument for the b = constnt cse pplies with equtions 10, 11, 12. 6 Exmples 6.1 Constnt, ( = 1) Suppose we strt with the primitive Pythgoren triple 119,120,169 nd wish to generte subsequent triples in the sequence. Using eqution 6 we obtin X 2 = 3X 1 + 2Z 1 + = 3(119) + 2(169) + 1 = 696, nd so the next triple is 696,697,985.

RH Dye & RWD Nicklls The Mthemticl Gzette (1998); 82, 86 91 5 6.2 Constnt, ( = 7) Strt with the primitive Pythgoren triple 5,12,13 ( = 7). In this cse our lgorithm genertes X 2 = 48, nd hence the triple 48,55,73, which misses the triple 21,28,35. 6.3 Constnt b, (b = 2) Strt with the primitive Pythgoren triple 8,15,17. Using eqution (10) we obtin Z 2 = 2X 1 + Z 1 + 2b = 2(8) + 17 + 2(2) = 37, nd so our next triple is 12,35,37, which misses the triple 10,24,26. 7 Alterntive reltionships for X n+1 nd Z n+1 The empiricl reltionship X n+1 = 6X n X n 1 + 2, described in recent rticle by Htch (1995) for the cse when = 1, is in fct prticulr cse of more generl reltionship which follows directly from our pproch, s follows. From eqution 6 From eqution 8 X n = 3X n 1 + 2Z n 1 + = 2(X n 1 + Z n 1 ) + X n 1 +. (13) b n = X n 1 + Z n 1. (14) Eliminting (X n 1 + Z n 1 ) between equtions 13 nd 14 gives But X n + + b n = Z n, so X n = 2b n + X n 1 +. X n = (2Z n 2X n 2) + X n 1 + = 2Z n 2X n + X n 1. Eliminting (2Z n ) using eqution 6 gives X n = (X n+1 3X n ) 2X n + X n 1, i.e. X n+1 = 6X n X n 1 + 2. (15) When = 1 then this is Htch s eqution X n+1 = 6X n X n 1 + 2, s required. Finlly, similr rgument shows tht the reltionship Z n+1 = 6Z n Z n 1 discussed by Mills (1996) for sequence with constnt, lso follows from our pproch. From eqution 5 2Z n+1 = 8X n + 6Z n + 4. (16) From eqution 6 Eliminting Z n between equtions 16 nd 17 gives 3X n+1 = 9X n + 6Z n + 3. (17) 2Z n+1 = 3X n+1 X n +.

RH Dye & RWD Nicklls The Mthemticl Gzette (1998); 82, 86 91 6 Using the corresponding equtions for Z n nd Z n 1 we see tht 2(Z n+1 6Z n + Z n 1 ) = 3(X n+1 6X n + X n 1 ) (X n 6X n 1 + X n 2 ) 4, which, by eqution 15, gives 2(Z n+1 6Z n + Z n 1 ) = 3(2) 2 4 = 0. Thus s required. Z n+1 = 6Z n Z n 1, 8 References Dvenport H. (1970). The higher rithmetic; n introduction to the theory of numbers. (Cmbridge University Press). Htch G. (1995). Pythgoren triples nd tringulr squre numbers. Mthemticl Gzette; 79 (Mrch), pp. 51 55 (JSTOR). Mills J.T.S. (1996). Another fmily tree for Pythgoren triples. Mthemticl Gzette; 80 (November), pp. 545 548 (JSTOR).