100% found this document useful (1 vote)
257 views22 pages

Diophantine Equations

This document discusses methods for solving certain Diophantine equations, which are equations to be solved in positive integers. It begins by introducing Diophantine analysis and listing some Diophantine equations it will provide methods for solving, mainly quadratic equations. It then provides some number theory background needed to understand the solutions. Specific Diophantine equations discussed include finding Pythagorean triples with certain properties and solving the general equation for Pythagorean triples parametrically.

Uploaded by

vsn
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
257 views22 pages

Diophantine Equations

This document discusses methods for solving certain Diophantine equations, which are equations to be solved in positive integers. It begins by introducing Diophantine analysis and listing some Diophantine equations it will provide methods for solving, mainly quadratic equations. It then provides some number theory background needed to understand the solutions. Specific Diophantine equations discussed include finding Pythagorean triples with certain properties and solving the general equation for Pythagorean triples parametrically.

Uploaded by

vsn
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

Some Diophantine Equations and How to Solve Them

Victor Nicola Introduction Diophantine analysis is a branch of number theory which deals with equations to be solved, usually, in positive integers. However, this may be extended, at times, to negative integers and to the rationals (where, incidentally, it all started with Diophantus). The equations, themselves, are called Diophantine. Listed below are some Diophantine equations, mainly of the second degree, with methods for solving them. This is not a chapter in a textbook: the presentation is more whimsical than systematic and the style is more chatty than formal. However, the mathematics is meant to be correct. This article is aimed at the enthusiastic rather than the professional number theorist. It is worth mentioning that some Diophantine equations are completely soluble: we know, sometimes with infinite patience, how to find all their respective solutions. Other equations, we know how to find only some of their respective solutions; while others we can, mathematically, demonstrate that they are insoluble. This leaves the last category of equations where we still do not know if they are, or are not, soluble. So, there is, still, a fertile ground for research and recreation in this field. Note on the last category: what is known as Fermats Last Theorem is about the solution of a particular class of Diophantine equations. Until recently we did not know for certain if these equations have integer solutions or not. Now we know that they dont. One, last, comment: every effort has been made to justify every mathematical result produced below either demonstrated/derived here or through a reference (sometimes general) to where the demonstration can be found. In what follows, unless otherwise stated, all variables and constant are meant to be positive integers. A bit of number theory background In this section, integers may be zero or negative too. * If a is a divisor of c and d then a is a divisor of mc + nd for any m and n. * We can always find m and n such that the greatest common divisor (gcd) of a and b = ma + nb. In particular, if a and b are relatively prime (gcd(a, b) = 1) then we can find m and n such that ma + nb = 1. * If a and b are such that a b is divisible by n (> 1) we say that a is congruent to b (or b is congruent to a) modulo n. We write this as a b (mod n) (or b a (mod n)). * If a b (mod n) then a b + kn (mod n) (and vice versa) for any integer k. It is customary to n n choose k such that < b + kn . Thus, we, usually, write 5 1 (mod 3) and not 5 2 (mod 3) 2 2 although the second choice is not wrong. * Two rules: if a b (mod n) and c d (mod n) then a + c b + d (mod n) and ac bd (mod n). * For a given n > 1, any integer, a, which satisfies the congruence x2 a (mod n) is called a quadratic residue modulo n. Since any integer, x, is 0, 1 or 1 (mod 3), it follows that x2 0 or 1 (mod 3). So 0 and 1 are quadratic residues modulo 3 and 2 is quadratic nonresidue modulo 3.

It can easily be verified that 0, 1 and 4 are quadratic residues modulo 5 while 2 and 3 are quadratic nonresidues modulo 5. * Fermats Little Theorem (FLT) states that if p is a prime and a is not a multiple of p then ap 1 1 (mod p) or ap 1 1 is divisible by p. Thus, if p = 5 and a = 2 then ap 1 1 = 15 which is divisible by 5.

Pythagorean triples We say that (x, y, z) is a Pythagorean triple (PT) (in what follows PT may stand, at times, for Pythagorean, or right-angled, triangle) if x2 + y2 = z2. It is worth mentioning that if (x, y, z) is a PT then (kx, ky, kz) is, also, a PT. Perhaps the most famous PT is (3, 4, 5) this triple leads to a few questions which I pose below:
(i) 3, 4 and 5 are consecutive natural numbers. Are there any other PTs with this property? Let the required PT be (x, x + 1, x + 2); then, x2 + (x + 1)2 = (x + 2)2; or, 2x2 + 2x + 1 = x2 + 4x + 4; or, x2 2x 3 = 0; or, (x 3)(x + 1) = 0. x = 3 is the only valid solution. Hence, the only PT with the required property is (3, 4, 5). 3, 4 and 5 are natural numbers in AP. Are there any other PTs with this property? Let the required PT be (x, x + d, x + 2d); then, x2 + (x + d)2 = (x + 2d)2; or, 2x2 + 2dx + d2 = x2 + 4dx + 4d2; or, x2 2dx 3d2 = 0; or, (x 3d)(x + d) = 0. x = 3d is the only valid solution. Hence, the only PTs with the required property are (3d, 4d, 5d). The PT (3, 4, 5) has the hypotenuse exceeding a side by 1. Are the other such PTs? The required PTs are of the form (x, y, y + 1); hence, x2 + y2 = (y + 1)2 = y2 + 2y + 1 x2 = 2y + 1 is an odd number. Therefore, x must be odd, too (the square of an even number is even). Let x = 2n + 1 2y + 1 = (2n + 1)2. Simplifying, we get y = 2n2 + 2n and the required PTs are of the form (2n + 1, 2n2 + 2n, 2n2 + 2n + 1). The PT (3, 4, 5) has the hypotenuse exceeding a side by 2. Are there other such PTs? We have, x2 + y2 = (y + 2)2 = y2 + 4y + 4; or, x2 = 4(y + 1). It follows that y + 1 must be a perfect square. Let y + 1 = n2 and the required PTs, then, are (2n, n2 1, n2 + 1). In the PT (3, 4, 5) the two sides, 3 and 4, are consecutive numbers. Are there other such PTs? We have,

(ii)

(iii)

(iv)

(v)

x 2 + ( x + 1) 2 = y 2 2x 2 + 2x + 1 = y 2 4x 2 + 4x + 2 = 2 y 2 (2 x + 1) 2 + 1 = 2 y 2 (2 x + 1) 2 2 y 2 = 1 Let u = 2x + 1 u 2 2 y 2 = 1 . This is an anti-Pellian (see below) with u1 = y1 = 1 (by inspection) and u0 = 1 & y0 = 1. Hence, u n +1 = 2(2 12 + 1)u n u n1 = 6u n u n 1

2 x n+1 + 1 = 6(2 x n + 1) (2 x n 1 + 1) 2 x n+1 = 12 x n 2 x n 1 + 4 x n +1 = 6 x n x n 1 + 2, x0 = y n +1 u0 1 u 1 = 1 & x1 = 1 = 0, 2 2 = 6 y n y n 1

The PT (x1, x1 + 1, y1) = (0, 1, 1) is not interesting. x 2 = 6 x1 x 0 + 2 = 0 + 1 + 2 = 3 y 2 = 6 y1 y 0 = 6 1 = 5 Giving us the PT (3, 4, 5). x3 = 6 x 2 x1 + 2 = 18 0 + 2 = 20 y3 = 6 y 2 y1 = 30 1 = 29 Giving us the PT (20, 21, 29). Etc. The reader may wish to investigate the existence of PTs with other properties.

Diversion 3, 4 and 5 are consecutive integers with the property 32 + 42 = 52. Also, 10, 11, 12, 13 and 14 are consecutive integers with the property 102 + 112 + 122 = 132 + 142. Are there other sequences of an odd number of consecutive integers exhibiting a similar property? Solution: Let there be k + 1 terms on the LHS with the largest being p2 and k terms on the RHS with the smallest being (p + 1)2. (To make the algebra less cumbersome, it is convenient, in this case, to list the terms on the LHS in descending order).
Thus, the LHS = ( p i ) 2 = p 2 + ( p i ) 2 and the RHS = ( p + i ) 2 . Hence,
k k k i =0 i =1 i =1

p 2 + ( p i ) 2 = ( p + i ) 2 p 2 = ( p + i ) 2 ( p i ) 2 = 4 pi = 4 p
k k k k

Since p 0, we have p = 2k(k + 1). k = 1 gives p = 4 and 32 + 42 = 52. k = 2 gives p = 12 and 102 + 112 + 122 = 132 + 142. k = 3 gives p = 24 and 212 + 222 + 232 + 242 = 252 + 262 + 272. Etc.
3

i =1

i =1

i =1

i =1

k (k + 1) = 2 pk (k + 1) . 2

The equation xn + yn = zn By the triangle inequality, x + y = z is not soluble if x, y and z are the sides of a triangle. Lemma: If (x, y, z) is a PT and if n > 2, then xn + yn < zn. Proof: zn = z2 zn 2 = (x2 + y2) zn 2 = x2 zn 2 + y2 zn 2 > x2 xn 2 + y2 yn 2 (z > x, y) = xn + yn From the above, we conclude that if (x, y, z) is a PT and if xn + yn = zn then n = 2. E.g. the equation 3n + 4n = 5n has only one solution: n = 2. The equation xy ax by = c
The idea, here, is to write the equation in the form (x b)(y a) = c + ab and, then, after dividing by (x b), e.g., to look for the values of x which make the LHS an integer.

Example: Find (PTs) whose perimeters are numerically equal to their respective areas. Solution: Let the sides of the PT be x and y. xy We have, x + y + x 2 + y 2 = 2 x 2 + y 2 = 2 x + 2 y xy . 2 Squaring both sides,

4 x 2 + 4 y 2 = 4 x 2 + 4 y 2 + x 2 y 2 + 8 xy 4 x 2 y 4 xy 2 x 2 y 2 + 8 xy 4 x 2 y 4 xy 2 = 0 ( xy 0) xy 4 x 4 y + 8 = 0 ( x 4)( y 4) = 8 8 y4= . x4 Assuming that y x, the only possible values for x are 5 and 6. Hence, the two required triangles are (5, 12, 13) and (6, 8, 10).
Exercises: (1) Find rectangles whose perimeters are numerically equal to their respective areas. (Ans: (3, 6) and (4, 4)). (2) Show that (3, 4, 5) is the only PT whose perimeter is, numerically, twice its area. The general PT So far, we found PTs which have special attributes. Our aim, in this section, is to find the general solution to the Diophantine equation x2 + y2 = z2 in parametric form: x = f(k, m, n, ), y = g(k, m, n, ) and z = h(k, m, n, ). There are several ways of going about this task; I have chosen the route, perhaps, least trodden. Beside the fact that this is the route Diophantus himself is said to have gone about it, it, also, introduces to the reader a technique for solving Diophantine equations they might not have been familiar with. It will be seen later that this technique applies to a large class of Diophantine equations both quadratic and cubic. We start by dividing our equation through by z2 to get X2 + Y2 = 1 (where X = x / z and Y = y / z) and try to solve the new equation in rationals. This new equation represents a circle with centre at the origin and radius 1 in the OXY plane. We
4

choose any point with rational coordinates on this circle I have chosen ( 1, 0). Any straight line with rational slope through this point meets the circle again in a point with rational coordinates. These coordinates are solutions to our equation. Furthermore, any solution in rationals to our equation is represented by a point on this circle and the chord joining this point with the point ( 1, 0) will have a rational slope. So, all we need now is to find the rational values for the slopes which make the straight lines through ( 1, 0) meet the circle (again) at points with rational coordinates. n n Let the straight lines have slope . The equation of these lines, then, is Y = ( X + 1) . m m
n2 ( X + 1)2 = 1 . 2 m 2 2 2 2 Simplifying, we get the quadratic (m + n ) X + 2n X (m 2 n 2 ) = 0 .

Substituting this in the circles equation, we get X 2 +

We know that X = 1 is a solution to this quadratic and we know that the product of the two
m2 n2 c solutions is 2 . (The product of the roots of the equation ax2 + bx + c = 0 is ). 2 a m +n

Hence,

To find our required Y, Y = Thus, x =

m2 n2 is our required X. m2 + n2

n m2 n2 2mn 2 . + 1 = ... = 2 m + n2 m m + n2

m2 n2 2mn x y z z&y = 2 z 2 = = 2 = k , say. 2 2 2 2 2mn m + n 2 m +n m +n m n x = k (m 2 n 2 ), y = 2kmn & z = k (m 2 + n 2 ) , (k > 0 and m > n).

This is the general solution we are seeking.

Two curiosities In the PT where x = m2 n2, y = 2mn and z = m2 + n2, (1) Let m n = 1 x = m + n x2 = m2 + 2mn + n2 = y + z. E.g. 32 = 4 + 5 and 52 = 12 + 13. (2) Let n = 1 x = m2 1, y = 2m and z = m2 + 1 y2 = 4m2 = 2(x + z). E.g. 42 = 2(3 + 5). Three squares in AP It is required to find three squares in AP. Let the squares be x2, z2 and y2. We have x2 + y2 = 2z2.
2 2

x+ y x y 2 Somebody noticed that this can be written as + =z . 2 2 x+ y x y x+ y x y This is a PT with sides , &z = k (m 2 n 2 ), = 2kmn & z = k (m 2 + n 2 ) . 2 2 2 2 Adding and subtracting the first two equations we get, x = k (m 2 n 2 + 2mn) & y = k (m 2 n 2 2mn) . So, the required three squares in AP are: k 2 (m 2 n 2 + 2mn) 2 , k 2 (m 2 + n 2 ) 2 & k 2 (m 2 n 2 2mn) 2 . The common difference, d, is given by:
2 2 2 2 2

d = k 2 (m 2 + n 2 ) 2 k 2 (m 2 n 2 + 2mn) 2 = k 2 (m 2 + n 2 m 2 + n 2 2mn)(m 2 + n 2 + m 2 n 2 + 2mn) = k (2n 2mn)(2m + 2mn) = 4k mn(n m ). Example: Let k = 1, m = 1 and n = 2, we get 12, 52 and 72; or, 1, 25 and 49 which, indeed, are squares in AP.
2

Note: To have an AP in ascending order, we need to have n > m which makes d > 0. If we want the AP to be in descending order, we need to have m > n which makes d < 0.
It was reported that in 1225, a mathematical team backed by the Emperor Frederick II posed the following problem to Fibonacci: Find a perfect square which remains a perfect square when increased or decreased by 5.
2 2 2 2 2

41 41 31 41 49 Fibonacci found the numbers: , 5 = & + 5 = . 12 12 12 12 12 We do not know by what method Fibonacci found the solution; however, since we are looking for three squares in AP with common difference of 5, we can use the formulas above (allowing m and n to be rational) to find this and, perhaps, other solutions (still, not easy!). In the given case: n = 5, m = 4 and k = 1 giving us 312, 412 and 492 with d = 720. Dividing through by 122 = 144 gives us the answer. Another example: It is required to find integers p and q such that both of the equations x2 px + q = 0 and x2 px q = 0 shall have integer (positive or negative) solutions.

Solution: Using the formula for solving quadratic equations, we have:


p 2 4q p p 2 + 4q and x = , respectively. So, we require p2 4q = u2 (say) and 2 2 2 2 p + 4q = v (say). Hence, we have three squares, u2, p2 and v2, in AP with d = 4q = 4k2mn(n2 m2) q = k2mn(n2 m2) and p = k(m2 + n2) (using the equations for three squares in AP). Thus, if p is the hypotenuse of a PT then q is its area. With the PT (3, 4, 5): the hypotenuse is 5 and the area is 6. Substituting, we get x2 5x + 6 = 0, which has 2 and 3 as solutions while x2 5x 6 = 0 has 6 and 1 as solutions. x= p

Three triangular numbers in AP


x( x + 1) (This 2 is the number of counters, or coins, needed for constructing the triangle x, x 1, x 2, , 1). The first few triangular numbers are: 1, 3, 6, 10, In this list, we seek to find three successive elements which are in AP. A triangular number, t, for our purpose, is an integer which can be written in the form

Solution:
We have, t = x 2 + x 4 x 2 + 4 x (4 x 2 + 4 x + 1) 1 (2 x + 1) 2 1 = = = . Or, 8t + 1 = (2 x + 1) 2 . 2 8 8 8 Hence, t is a triangular number if, and only if, 8t + 1 is a square of an odd number. If a, b, and c are triangular numbers in AP, then 8a + 1, 8b + 1 and 8c + 1 are, also, in AP (and vice versa). This means that we need to search for three squares (of odd numbers) which are in AP. Using the result we obtained for squares in AP, the triangular numbers in AP are:

k 2 m 2 n 2 + 2mn 1 k 2 m 2 + n 2 1 k 2 m 2 n 2 2mn 1 , & . 8 8 8 We need to have k odd and m & n of different parity to ensure that the three squares are all odd. Furthermore, to have an ascending sequence, we need m < n.
6

Example: Let m = 2 n = 3 and k = 1.


The sequence, then, is (4 9 + 12) 2 1 (4 + 9) 2 1 (4 9 12) 2 1 , & . 8 8 8

Or: 6, 21 and 36. These numbers are in AP and 6 = 3(3 + 1)/2, 21 = 6(6 + 1)/2 and 36 = 8(8 + 1)/2 all triangular.

The equation x2 + y2 = 3z2 We assume that x, y and z do exist and have no common factor other than 1 (otherwise we cancel it - twice). Note: any factor common to any two terms must divide the third. As we have seen above, 0 and 1 are quadratic residues while 2 is quadratic nonresidue modulo 3. Since the RHS of our equation is divisible by 3, it follows that both x and y are multiples of 3 (otherwise, on division by 3, the LHS will be leaving a remainder of 1 or 2, while the RHS will be leaving a remainder of 0 - impossible). Let x = 3x and y = 3y 9x2 + 9y2 = 3x2 3(x2 + y2) = z2 z = 3z x2 + y2 = 3z2. We notice that having a solution (x, y, z) to our equation implies the existence of another solution with smaller values, (x, y, z). Since this cannot go on forever, we conclude that our original assumption that such a solution exists is false. In other words, the equation x2 + y2 = 3z2 is not soluble in integers The above method of proof is called infinite descent and is due to Fermat. Incidentally, using this method, Fermat proved that no PT can have a perfect square for an area (or, the equation mn(m2 n2) = u2 is not soluble in integers); Fermats proof can be found in number theory textbooks.
Another, less fancy, way is to notice the fact that x, y and z are all divisible by 3 contradicting our assumption that they have no common factor other than 1. This shows that not all Diophantine equations are soluble.

The equation ax2 + bxy + cy2 = dz2 (a, b, c and d can be positive, negative whole numbers or zero). A method for tackling this type of equation is first to attempt to find one solution using whatever means: trial and error, writing a short computer program, etc. If we fail, we try to prove that the equation is not soluble in integers: a good approach here is to check remainders (as we did above). If we succeed in finding one solution, we divide the equation through by z2 to obtain the equation, x y aX 2 + bXY + cY 2 = d , ( X = & Y = ) . This is the equation a conic section in the OXY plane. We z z now proceed as we did above: passing a straight line through the point we found and determining where this chord meets the conic section again, etc. Exercise: Given that (1, 1, 1) satisfies the equation 3x2 + 4xy 6y2 = z2, find its general solution. Ans: x = k(6m2 12mn +7n2), y = k( 2m2 + 6mn 3n2) and z = k(6m2 4mn 3n2) (m and n may be positive, or negative, integers). Cubic polynomials It is required to find cubic polynomials whose roots and the roots of their respective derivatives are integers.
7

Solution: The required cubic polynomials, by translation, can be brought to the form, f(x) = ax(x p)(x q) (p, q are integers) f(x) = a(3x2 2(p + q)x + pq). The formula for finding the roots of f(x) is:
2( p + q ) 4( p + q ) 2 12 pq ( p + q ) p 2 pq + q 2 x= = . 6 3 To have integer roots, we need p2 pq + q2 = u2. Also, (p + q u) must be divisible by 3. p q Putting X = & Y = , we get X2 XY + Y2 = 1. Note that X = Y = 1 is a solution. u u Proceeding as above, we get p = km(m 2n), q = kn(n 2m) and u = k(m2 mn + n2). Since m and n can be either positive or negative, we may let m = m p = km(m + 2n), q = kn(n + 2m) and u = k(m2 + mn + n2), for aesthetic reasons. p + q + u = k(2m2 + 5mn + 2n2) k is divisible by 3 or, by considering remainders modulo 3, if mn 1 is divisible by 3. We may exclude the cases where m and n have a common divisor larger than 1 because this can be absorbed in k. p + q u = 3kmn is, always, divisible by 3. E.g.: Let k = 1, m = 4 and n = 1 (mn 1 = 3: divisible by 3) p = 24 and q = 9 f(x) = ax(x 24)(x 9) f(x) = a(3x2 66x + 216) = 3a(x 4)(x 18).

Note: The equation X2 XY + Y2 = 1 crops up in attempting to solve the problem: find triangles with integer sides such that one of their respective angles is 60 degrees. Assuming that C = 60 degrees and using the cosine rule, we have c2 = a2 + b2 ab, which leads to the above equation. The reader may wish to investigate triangles with integer sides such that the cosine of one of their respective angles is rational. This equation crops up, also, in the next instance. The equation x3 + y3 = z2 This is a very partial solution we have (x + y)(x2 xy + y2) = z2; consider the case where both x + y and x2 xy + y2 are perfect squares. Let x + y = u2 and x2 xy + y2 = v2 so that z = uv. We saw above that the general solution of x2 xy + y2 = v2 is x = km(m + 2n), y = kn(n + 2m) and v = k(m2 + mn + n2). Hence, x + y = k(m2 + 4mn + n2) = u2. One possibility: choose any m and n, evaluate m2 + 4mn + n2 and choose k such that k(m2 + 4mn + n2) is a perfect square. E.g.: let m = n = 1 m2 + 4mn + n2 = 6. Let k = 6 x = 18, y = 18, x + y = 36, u = 6, v = 18 and z = 108 183 + 183 = 1082. Also, let m = 1, n = 1 and k = 2 to get 23 + 23 = 42.
Another possibility: set k = r2, solve m2 + 4mn + n2 = u2 (u = ru). By inspection, m = 4, n = 1 and u = 1 is a suitable starting point. I will leave it to the reader to solve the ensuing equation to find suitable values for m, n and u. From there the solutions x, y and z are found. Using a similar method, solutions to the equation x3 y3 = z2 can, also, be found.

Primitive PTs We say that the PT (x, y, z) is primitive if the greatest number that divides x, y and z is 1. Note that any number that divides any two of the sides divides the third. We saw above that the general solution of the equation x2 + y2 = z2 is: x = k (m 2 n 2 ), y = 2kmn & z = k (m 2 + n 2 ) .
For the PT to be primitive, k must equal 1. This, however, is not enough: we must, also, have m and n to be relatively prime (greatest number that divides m and n is 1) and m > n. Is this enough? We notice that if m and n are both odd, or are both even, then x, y and z are all even. So, m and n must be of opposite parity. Is this enough? The answer is yes.

Proof: Let k =1 and let m and n be relatively prime and of opposite parity. Hence, m2 and n2 are relatively prime and of opposite parity. Any number, u, which divides two sides of a PT, must, also, divide the third. So, if we prove that two sides are relatively prime, the PT must be primitive. Let u divide both m2 + n2 and m2 n2, u must be odd (because m2 + n2 and m2 n2 are both odd) and it must divide both their sum and difference; i.e. u must divide 2m2 and 2n2. Therefore, u = 1 (u is odd and m2 & n2 are relatively prime). This shows that choosing k = 1, m & n (m > n) relatively prime and of opposite parity guarantees a primitive PT In primitive (and all other) PTs, xyz is divisible by 60 One of the sides of a primitive PT (2mn) is, obviously, divisible by 2. Since either m or n is even, 2mn is divisible by 4. The other two sides are odd. If either m or n is divisible by 3, the side 2mn is divisible by 3. Otherwise, we utilise Fermats Little Theorem to show that, on division by 3 (a prime), m2 n2 leaves a remainder of 1 1 = 0. I.e. m2 n2 is divisible by 3. So, either the side 2mn or m2 n2 is divisible by 3.
If either m or n is divisible by 5, the side 2mn is divisible by 5. Otherwise, we utilise Fermats Little Theorem to show that, on division by 5 (a prime), m4 n4 leaves a remainder of 1 1 = 0. I.e. m4 n4 is divisible by 5. But m4 n4 = (m2 n2)( m2 + n2) The side 2mn, m2 n2 or the hypotenuse m2 + n2 is divisible by 5. Since 3, 4 and 5 are relatively prime in pairs, we conclude that the product of the three sides in a primitive (and, hence, in all other) PT is divisible by 3 4 5 = 60 We saw that in a primitive PT one side is divisible by 4, one side is divisible by 3 and one side is divisible by 5. These sides need not be different: in (3, 4, 5) the sides are, indeed, different. In (5, 12, 13) one side is divisible by 5 and one by 4 and 3, in (8, 15, 17) one side is divisible by 4 and one by 3 and 5 and in (11, 60, 61) one side is divisible by all three. Incidentally, the numbers 3, 4 and 5 appear here in a different context. I have a feeling that numerologists may find significance in this coincidence.

Binomial coefficients in AP Problem: The coefficients of xr, xr + 1 and xr + 2 in the binomial expansion of (1 + x)n are in AP. Find possible values for n and the corresponding possible values of r.
9

Solution: We have, n n n n(n 1)...(n r + 1) n(n 1)...(n r 1) n(n 1)...(n r ) + + = 2 r r + 2 = 2 r + 1 r! (r + 2)! (r + 1)!

= 8r + 17 (2n 4r 5) 2 = 8(r + 2) + 1 Since (2n 4r 5) is odd, the LHS is a square of an odd number r + 2 is a triangular number

(2(n 2r ) 5)2

(n 2r ) 2 + 8r 5n + 2 = 0 (n 2r ) 2 5(n 2r ) = 2r 2 4(n 2r ) 2 20(n 2r ) + 25 = 8r + 17

r 2 + 3r + 2 + n 2 nr n nr + r 2 + r = 2(nr + 2n r 2 2r ) n 2 + 4r 2 + 8r 4nr 5n + 2 = 0

1 (n r )(n r 1) 2(n r ) + = (r + 1)(r + 2) + (n r )(n r 1) = 2(n r )(r + 2) r! (r + 2)! (r + 1)!

(1) Let 2n 2(k 2 + k 4) 5 = 2k + 1 ... n = k 2 + 2k 1 = (k + 1)2 2 with a corresponding value for r = k2 + k 4 . 2 (2) Putting 2n 2(k 2 + k 4) 5 = (2k + 1) ... n = k 2 2 for the same value of r.

(2n 2(k

k (k + 1) k2 + k 4 = , say. r = (after substituting for r) 2 2


2

+ k 4) 5 = 4(k 2 + k 4) + 17 = (2k + 1) 2 2n 2(k 2 + k 4) 5 = (2k + 1) .


2

n n Since = r n r , it follows that the coefficients Pascal triangle is symmetrical and finding one set of three coefficients in AP, automatically yields another (a mirror image): one ascending and the other descending. It follows that for any suitable n there should be two values for r. 7 7 7 k = 2 yield n = 7 and r = 1 = 7, = 21 & = 35 . Indeed, 7, 21 and 35 are in AP. 1 2 3 To find the descending sequence, we set k = 3 in the second equation to yield n = 32 2 = 7, but,
r=

7 7 7 So, the mirror coefficients are: = 35, = 21 & = 7 are, also, in AP. 4 5 6 The use of complex numbers Complex numbers can, sometimes, be helpful in obtaining number theory results. The following is one result already known to us and a couple more results which would have been less easy to obtain without complex numbers. Let w = u + iv w2 = u2 v2 + 2iuv. Using the polar form of complex numbers (w = |w|eiq wn = |w|neinq), we get |wn| = |w|n
w = u 2 + v 2 = w 2 = (u 2 v 2 ) 2 + (2uv) 2 (u 2 + v 2 ) 2 = (u 2 v 2 ) 2 + (2uv) 2 .
2

32 + 3 4 = 4. 2

So, very easily, we found solutions to the equation x 2 + y 2 = z 2 . We know that this is not the general solution and, sadly, there is no way, using this method, we can determine that this is, indeed, the case.
10

However, we can use this method to solve equations of the type x 2 + y 2 = z n ; again, perhaps, finding only partial solutions. I will illustrate this in the case of n = 3: Let w = u + iv w3 = u3 3uv2 + i(3u2v v3). Hence,
w = u 2 + v 2 w = (u 2 + v 2 ) 3 = w 3
2 6 2

= (u 3 3uv 2 ) 2 + (3u 2 v v 3 ) 2 .

We conclude that x = (u3 3uv2), y = (3u2v v3) and z = u2 + v2 are solutions to the equation x 2 + y 2 = z 3 .

Example: Let u = 2 and v = 1. We have x = (8 6) = 2, y = (12 1) = 11 and z = 4 + 1 = 5. Indeed, 22 + 112 = 53 = 125. To prevent the algebra from producing negative values for x and y, we
use x = u 3 3uv 2 & y = 3uv 2 v 3 .

Two useful identities z1 = x1 + iy1 & z 2 = x 2 + iy 2 z1 z 2 = ( x1 x 2 y1 y 2 ) + i ( x1 y 2 + x 2 y1 ).

z1 z 2

= z1 z 2

2 2 ( x12 + y12 )( x 2 + y 2 ) = ( x1 x 2 y1 y 2 ) 2 + ( x1 y 2 + x 2 y1 ) 2

z1 = x1 iy1 & z 2 = x 2 + iy 2 z1 z 2 = ( x1 x 2 + y1 y 2 ) + i ( x1 y 2 x 2 y1 ). z1 z 2
2 2

= z1 z 2

2 2 ( x12 + y12 )( x 2 + y 2 ) = ( x1 x 2 + y1 y 2 ) 2 + ( x1 y 2 x 2 y1 ) 2 2 2 Combining the two identities: ( x12 + y12 )( x 2 + y 2 ) = ( x1 x 2 y1 y 2 ) 2 + ( x1 y 2 m x 2 y1 ) 2 .

These identities crop up in different places in number theory, e.g. in representing numbers as sums of two, or more, squares. We can use these identities to generate new PTs from known ones. Consider the PT (3, 4, 5): let x1 = x2 = 3 and y1 = y2 = 4 (32 + 42)(32 + 42) = (3 3 4 4)2 + (3 4 + 3 4)2; or, 252 = 72 + 242.

The equation x2 + y2 = u2 + v2 Combining the two useful identities above we get: ( x1 x2 y1 y2 ) 2 + ( x1 y2 + x2 y1 ) 2 = ( x1 x2 + y1 y2 ) 2 + ( x1 y2 x2 y1 ) 2 .


Thus, x = k|pq rs|, y = k|ps + qr|, u = k|pq + rs| and v = k|ps qr| are solutions to the above equation. p, q, r and s are positive, or negative, integers. Let k = 1, p = 1, q = 2, r = 2 and s = 3 x = |2 6|, y = |3 + 4|, u = |2 + 6| and v = |3 4| 42 + 72 = 82 + 12 . The solutions to this equation provide us with the facility to find two right-angled triangles with integer sides having equal hypotenuses. If we place these two PTs side by side so that their respective hypotenuses coincide, we get a cyclic quadrilateral with integer sides. In the example given, the sides of the quadrilateral are 4, 7, 8 and 1. The circle diameter, incidentally, is 65 .
11

More than two squares adding up to a square We can generate a list (a1, a2, , an) as long as we want such that a12 + a22 + a32 + + an2 = m2. Example: Start with 32 + 42 = 52. Let 52 = 25 = u2 v2 = (u v)(u + v). Let u v = 1 and u + v = 25 u = 13 and v = 12 52 = 132 122 32 + 42 + 122 = 132. We can, now, write 132 as the difference between two squares to get 32 + 42 + 122 + 842 = 852, and so on. The equation x2 + y2 + z2 = t2 This equation has a general solution:
k (l 2 + m 2 n 2 ) k (l 2 + m 2 n 2 ) x= , y = 2kl , z = 2km & t = , n is a divisor of l2 + m2 n n and n < l 2 + m 2 . The derivation of this solution can be found in the book Elementary Theory of Numbers by W. Sierpinski.

Example: Let k = 1, l = 3, m = 1 ( l2 + m2 = 10) and n = 2 x = 3, y = 6, z = 2 and t = 7, which gives, 32 + 62 + 22 = 72 . The Pellian The equation x 2 Ny 2 = 1, N n 2 is named after a mathematician (John Pell, 1611 1685) who had very little to do with it. Originally, the equation was written as x 2 = Ny 2 + 1 . In words, find x and y such that (given) N
times y2 plus 1 equals x2. In the case of N = 2, the smallest solution is x = 3 and y = 2. It is not difficult to show that if N is a perfect square, there are no solutions to the equation other than x = 1 and y = 0. In number theory textbooks it is shown that the Pellian has infinitely many solutions and a method for finding them, using continued fractions, is demonstrated. Here, we will assume that, by trial and error (or otherwise), the smallest values of x and y which satisfy the equation (x1 and y1, respectively) are known. These are, sometimes, called the fundamental solution. Incidentally, finding the fundamental solution for some values of N is not all that straightforward: try N = 94 (ans: x1 = 2143295, y1 = 221064). Number theory textbooks go further to show that for every n, xn and yn given by

x n + y n N = ( x1 + y1 N ) n , are solutions to the equation. Furthermore, it is shown that all


solutions to the equation can be obtained using this formula. The problem here is that for medium values of n, not to mention large, the calculation becomes tiresome (we can, of course, use a computer to do the job). Here, we shall develop a recursive method for finding solutions: we have,

xn+1 + y n+1 N = ( x1 + y1 N ) n+1 = ( x1 + y1 N )( x1 + y1 N ) n = ( x1 + y1 N )( xn + y n N ) = ( x1 xn + Ny1 y n ) + ( x1 y n + xn y1 ) N Also,

12

x n 1 + y n 1 N = ( x1 + y1 N ) n 1 =

( x1 + y1 N ) n ( x1 + y1 N )

( x n + y n N ) ( x1 y1 N ) = ( x1 + y1 N ) ( x1 y1 N )

( x n + y n N )( x1 y1 N ) = ( x n + y n N )( x1 y1 N ) = ( x1 x n Ny1 y n ) + ( x1 y n x n y1 ) N x12 Ny12 From the two equations above, we conclude that: x n +1 = x1 x n + Ny1 y n , y n +1 = x1 y n + x n y1 , x n 1 = x1 x n Ny1 y n , y n 1 = x1 y n x n y1 . Adding the first and third equations, rearranging, adding the second and fourth equations, rearranging, we get, x n +1 = 2 x1 x n x n1 y n +1 = 2 x1 y n y n1 These are the recursive equations we are after. We, still, need to find values for x0 and y0. We have,

x n + y n N = ( x1 + y1 N ) n . By putting n = 0, we get x0 = 1 and y0 = 0.


Note: As n gets larger, so do xn an yn. If we consider the Pellian as a hyperbola in the Oxy plane, the
equations of its asymptotes are y = N x . In the first quadrant, as x and y increase, the hyperbola approaches further and further its asymptote y = N x . Algebraically, this means that giving us better and better rational approximations to N . Another example: 36 coins can be arranged as either a 6 6 square or an 8 + 7 + + 1 triangle. Are there any other quantities of coins with this property?

yn N; xn

Solution: We saw above that t is a triangular number provided 8t + 1 is a perfect square (x2, say). Since we want t, itself, to be a perfect square, we have the equation 8y2 + 1 = x2, or x2 8y2 = 1, a Pellian. By inspection, x1 = 3 and y1 = 1. Also, x0 = 1 and y0 = 0 (standard). We are interested in t (= y2). We have, t1 = y12 = 1. The recursive equation for y is: y n +1 = 2 x1 y n y n1 ; or, y n +1 = 6 y n y n 1 .
y2 = 6y1 y0 = 6 0 = 6 t2 = 62 = 36. y3 = 6y2 y1 = 36 1 = 35 t3 = 352 = 1225 = 49 (49 + 1) / 2 = 49 + 48 + 47 + + 1, etc.

The equation (x + 1)3 x3 = y2 We are looking for two successive cubes whose difference is a square. After expanding and simplifying, we get 3x2 + 3x + 1 = y2. The strategy, here, is to multiply through by 4 the coefficient of x2 (= 12), complete the square and see what to do next. We have 36x2 + 36x + 12 = 12y2 (6x + 3)2 + 3 = 12y2 9(2x + 1)2 + 3 = 12y2. Dividing through
13

by 3 and rearranging, (2y)2 3(2x + 1)2 = 1. Let 2y = u and 2x + 1 = v. Hence, u2 3v2 = 1 a Pellian with u1 = 2 and v1 = 1. This gives y1 = 1 and x1 = 0; or, 13 03 = 12: not interesting. The recursive equations are: un+1 = 4un un-1 and vn+1 = 4vn vn -1 u2 = 4u1 u0 = 4 2 1 = 7 and v2 = 4v1 v0 = 4 1 0 = 4 2y2 = 7, which is not acceptable. u3 = 4u2 u1 = 4 7 2 = 26 and v3 = 4v2 v1 = 4 4 1 = 15 2y3 = 26 and 2x3 + 1 = 15 y3 = 13 and x3 = 7 83 73 = 132, which is true. If we continue to look for more solutions, we see that the parity of u alternates between even and odd (we need u to be even). In these situations we can use the equation,

x n + N y n = ( x1 + N y1 ) 2 n 1 . This yields the recursive equations,


x n +1 = 2(2 x12 1) x n x n 1 & y n +1 = 2(2 x12 1) y n y n 1 , with x0 = x1 and y0 = y1. (For the derivation of these equations, see the derivation of the corresponding ones for the anti-Pellian below). In our case, un+1 = 2(2 22 1)un un-1 = 14un un-1 and vn+1 = 14vn vn-1, with u0 = u1 = 2, v0 = v1 = 1. Thus, u2 = 14 2 2 = 26 and v2 = 14 1 + 1 = 15, etc.

Solving the Pellian in rationals In the Oxy plane, the equation x2 Ny2 = 1 describes a hyperbola which passes through the point A( 1, 0). m The line y = ( x + 1) passes through A and, after a bit of algebra, it meets the hyperbola again at n

n 2 + Nm 2 2mn 2 n Nm 2 , n 2 Nm 2 .

n 2 + Nm 2 2mn and y = 2 provide all the solutions to the Pellian in rationals. 2 2 n Nm n Nm 2 Note that if x = n and y = m is a solution in integers n2 Nm2 = 1 x = n2 + Nm2 and y = 2mn is, also, a solution in integers. Note, also, that, here, N is allowed to be a perfect square; however, n2 Nm2 0. In other words, x =

The anti-Pellian We have seen above how to tackle the equation x2 = Ny2 + 1 (N n2); how about the equation x2 = Ny2 1 (N n2)? There are mathematical similarities and dissimilarities between these two equations: one dissimilarity between them is that the first is always soluble in both integers and rationals while the other is not always soluble (it depends on the value of N). One important similarity, however, is that if the second is soluble, the method of its solution is very similar to that of the firsts: both can be solved using continued fractions. In the case of the anti-Pellian, the
presentation of N in continued fractions helps to determine if the equation is soluble for this particular value of N or not. As before, it will be assumed that the fundamental solution (x1, y1) exists and is known. A recursive method for finding the other solutions is then developed. Number theory textbooks show that the general solution to the anti-Pellian can be written as x n + N y n = ( x1 + N y1 ) 2 n 1 .
14

We now proceed as before, bearing in mind that x 2 Ny 2 = ( x N y )( x + N y ) = 1 : x n +1 + N y n +1 = ( x1 + N y1 ) 2 n +1 = ( x1 + N y1 ) 2 ( x1 + N y1 ) 2 n 1 = ( x1 + N y1 ) 2 ( x n + N y n ) = ...

= (2 x12 + 1) x n + 2 Nx1 y1 y n + N ((2 x12 + 1) y n + 2 x1 y1 x n ).


Also,

x n 1 + N y n 1 = ( x1 + N y1 ) 2 n 3 =

( x1 + N y1 ) 2 n 1 ( x1 + N y1 ) 2

( x n + N y n )( x1 N y1 ) 2 ( x12 N y12 ) 2

= ...

= (2 x12 + 1) x n 2 Nx1 y1 y n + N ((2 x12 + 1) y n 2 x1 y1 x n ) From the above two equations we get: x n +1 = (2 x12 + 1) x n + 2 Nx1 y1 y n , y n +1 = (2 x12 + 1) y n + 2 x1 y1 x n , x n 1 = (2 x12 + 1) x n 2 Nx1 y1 y n , y n 1 = (2 x12 + 1) y n 2 x1 y1 x n . Adding the first and third equations, rearranging, adding the second and fourth equations, rearranging, we get, x n +1 = 2(2 x12 + 1) x n x n 1

y n +1 = 2(2 x12 + 1) y n y n 1
These are the recursive equations we are after. We, still, need to find values for x0 and y0. We have,

x n + y n N = ( x1 + y1 N ) 2 n 1 . Putting n = 0, we get x0 + y 0 N = ( x1 + y1 N ) 1 = ( x1 N y1 ).
Hence, x0 = x1 and y0 = y1. These are the recursive equations we used above when solving the problem of PTs with two consecutive numbers as sides.

The anti-Pellian is not always soluble in rationals Proof Consider the equation x2 3y2 = 1 and assume that it is soluble in rationals:
let x = u v u 2 3v 2 & y = 2 2 = 1 u 2 3v 2 = w 2 u 2 + w 2 = 3v 2 . But we saw that this w w w w equation is not soluble in integers. We conclude that our assumption was wrong.

Example: Find two successive triangular numbers which are the sides of a PT. Let the triangular numbers be:
t x 1 = ( x 1) x x( x + 1) x2 2 x 2 ( x 2 + 1) & tx = ( x 2 x + 1 + x 2 + 2 x + 1) = = y2. 2 2 4 2 x2 x2 +1 or is a 2 2

Since x2 and x2 + 1 have no common divisor other than 1, it follows that either

x2 perfect square. If were a perfect square then 2 would be rational - which is false. We 2
15

conclude that

x2 +1 = z 2 x 2 2 z 2 = 1 : an anti-Pellian (x1 = z1 = 1). The smallest solution is 212 2 + 282 = 352 (21 and 28 are successive triangular numbers). Another example: 3 and 6 are two triangular numbers with 6 being double 3. Are there other such pairs of triangular numbers?

Solution: Let the triangular numbers be t1 and t2 (t1 = 2 t2). We saw above that t1 and t2 can be written as:
x2 1 y2 1 & , respectively (x and y are odd). 8 8

Hence,

x2 1 y2 1 = 2 x 2 1 = 2 y 2 2 x 2 2 y 2 = 1 , 8 8

x1, y1, y0 = 1 and x0 = 1 xn + 1 = 6xn xn 1 and yn + 1 = 6yn yn 1. Hence, x2 = 7 and y2 = 5 t1 = 6 and t2 = 3; x3 = 41 and y3 = 29 t1 = 210 and t2 = 105; etc.

Problem The sum of a series of x consecutive numbers, beginning with y, equals the product of the first and last terms of the series. Find possible values for x and y. Two sets of simultaneous equations: (1) Find integer values for p, such that both p + 1 and 2p + 1 are perfect squares. Solution: p = y2 1 satisfies the first condition for all integer values of y. We, now, substitute this general value of p in the second condition to get 2(y2 1) + 1 = x2 or, x2 2y2 = 1, x1 = y1 = y0 = 1 and x0 = 1. Hence, yn+1 = 2(2x12 + 1)yn yn-1 = 6yn yn-1 (xn is not interesting). So, y2 = 6 1 = 5 giving p + 1 = 52 and 2p + 1 = 72; y3 = 6 5 1 = 29 giving p + 1 = 292 and 2p + 1 = 412, etc. ux 2vy = 2 (2) Find solutions for 4vx uy = 10 Solution: Consider the set to be linear simultaneous equations in x and y. Solving them we get: 2u 20v 8v 10u x= 2 &y= 2 . 2 u 8v u 8v 2 Since u and v are integers, the denominator must be an integer, M, say. * M = 1 leads to u1 = 3 and v1 = 1: u1 > v1 y1 < 0. For larger values of n, u remains larger than v and, hence, y < 0. We conclude that M 1. (u = 1, v = 0 also makes y negative). * M = 1: we get u2 + 1 = 8v2 u is odd because u2 = 8v2 1. Let u = 2k + 1 (2k + 1)2 + 1 = 4k(k + 1) + 2 = 8v2; dividing through by 2, we get 2k(k + 1) + 1 = 4v2. Two terms are even while the third is odd impossible. Hence, M 1.
16

* M = 2: u is even (= 2u) 4u2 8v2 = 2 2u 2 4v2 = 1. The LHS is even while the RHS is odd M 2. * M = 3: if u or v is divisible by 3, so must the other be 3u2 24v2 = 1. The LHS is divisible by 3 but the RHS is not no solutions there. If neither u nor v is divisible by 3, we have, u2 8 v2 1 (mod 3) the LHS is congruent to 2 modulo 3 while the RHS is congruent to 0 modulo 3. We conclude that M 3. * M = 4: ui > vi, i = 0, 1, 2, (u1 = 6 and v1 = 2) y is always negative not acceptable M 4. * M = 4: We have u2 8v2 = 4; u must be even (= 2w, say) w2 2v2 = 1. w1 = v1 = v0 = 1 and w0 = 1. Also, u1 = 2w1 = 2 and u0 = 2w0 = 2. wn+1 = 2(2 12 + 1)wn wn 1 = 6wn wn 1 un+1 = 6un un 1 and vn+1 = 6vn vn 1. (u0, v0) does not yield a valid solution. 2 u1 20 v1 8 u1 10 v1 x1 = = 4 & y1 = = 3 u = 2, v = 1, x = 4 & y = 3 is a valid solution. 4 4 u2 = 6u1 u0 = 12 + 2 = 14 and v2 = 6v1 v0 = 6 1 = 5. This yields x2 = 18 and y2 = 25 (u, v, x, y) = (14, 5, 18, 25) is another solution. Three more solutions are (82, 29,104,147), (478, 169, 606, 857) and (2786, 985, 3532, 4995). Etc. There may be other solutions emanating from other values of M.

The equations x2 Ny2 = n2 An obvious way to go about these equations is to let x = nu and y = nv to get u2 Nv2 = 1 and, then, proceed as above. However, there are some equations like x2 5y2 = 4 which admit other, spurious, solutions like x = y = 1. In this case, the given equation needs to be treated as a general Pellian (see below). Using congruences, it is possible, sometimes, to determine if the given equation does, or does not, have such spurious solutions. As an example, consider the equation x2 3y2 = 4. Clearly, if either x or y is even, the other must be even, too. If both x and y are odd, the LHS is congruent to 2 modulo 4 while the RHS is congruent to 0 modulo 4. We conclude that there are no spurious solutions in this case. A problem Find three successive triangular numbers whose product is a perfect square. Two more useful identities We proved, above, the two useful identities: 2 2 ( x12 + y12 )( x 2 + y 2 ) = ( x1 x 2 y1 y 2 ) 2 + ( x1 y 2 m x 2 y1 ) 2
If we replace x1, y1, x2 and y2 with x, i N y, u & i N v, respectively, we get: ( x 2 Ny 2 )(u 2 Nv 2 ) = (ux Nvy ) 2 N (vx uy ) 2 : two more useful identities.

The general Pellian We shall deal here with the equation x2 Ny2 = C (N n2) sometimes other quadratics can be brought to this canonical form (see the following example with the equation involving combinations). This equation is not always soluble in integers; however, if one solution can be found (by using continued fractions, trial and error, etc), then infinitely many can be found. Some theory about this subject can be found in the book Advanced Algebra by Barnard and Child. In what follows, we will see a way of finding some, if not all, the possible solutions.
17

It is required to solve x2 Ny2 = C. Let un and vn be solutions of u2 Nv2 = 1 then un2 Nvn2 = 1. By using one of the two more useful identities above, we have: ( x 2 Ny 2 ) 1 = (u n x + Nv n y ) 2 N (v n x + u n y ) 2 = C .

x = (u n r + Nv n s ) & y = (v n r + u n s ) , n = 1, 2, are, also, solutions of x2 Ny2 = C.

Thus, if x = r and y = s is a solution of x2 Ny2 = C, then (u n r + Nv n s ) 2 N (v n r + u n s ) 2 = C .

Example: solve x2 3y2 = 2. x = r = 1 and y = s = 1 is a possible solution of this equation. u2 3v2 = 1 is a Pellian with u1 = 2, v1 = 1, u0 = 1 and v0 = 0. We have, x = (u1 r + 3v1 s ) = (2 + 3) & y = (v1 r + u1 s ) = (1 + 2) (x, y) = (5, 3) is a solution.
u2 = 4u1 u0 = 7 and v2 = 4v1 v0 = 4 x = (u 2 r + 3v 2 s ) = (7 + 12) & y = (v 2 r + u 2 s ) = (4 + 7)
(x, y) = (19, 11) is a solution; (u3, v3) yields one more solution, etc. If we can find other values for r and s, then these, in turn, will provide more solutions. There is theory which deals with this and can be found in Barnard & Childs book.

Notes: (1) x =| u n r Nv n s | & y =| v n r u n s | does not yield any new solutions.


(2) The equation in this example appears in trying to solve the following problem: in a fun run, where a few thousand people took part, a runner discovered that the number on their jersey, x, is such that 1 + 2 + + (x 1) = 2((x + 1) + (x + 2) + + y), where y was the number of runners. Find x and y.

m m + 1 The equation, (in m and r), r + 1 = r Solution: m! (m + 1)! We have, = . (r + 1)!(m r 1)! r!(m r + 1)!
After cancellations,

1 m +1 = (m r )(m r + 1) = (m + 1)(r + 1). r + 1 (m r )(m r + 1) Opening brackets, cancelling and rearranging,

m 2 3mr + r 2 = 2r + 1 4m 2 12mr + 4r 2 = 8r + 4 (2m 3r ) 2 5r 2 = 8r + 4


(2m 3r ) 2 = 5r 2 + 8r + 4 20(2m 3r ) 2 = 100r 2 + 160r + 80 = (10r + 8) 2 + 16 = 4(5r + 4) 2 + 16 5(2m 3r ) 2 = (5r + 4) 2 + 4 (5r + 4) 2 5(2m 3r ) 2 = 4. Let 5r + 4 = x and 2m 3r = y x2 5y2 = 4. (1) x = 2u, y = 2v u2 5v2 = 1. The general solution here is un+1 = 18un un-1, vn+1 = 18vn vn-1, u1 = u0 = 2 and v1 = v0 = 1. (u1, v1) yields (x1, y1) = (4, 2) 5r + 4 = 4, or, r = 0 and m = 1. 1 2 Check = , which is correct. 1 0 u2 = 18u1 u0 = 38 and v2 = 18v1 v0 = 17 x = 76 and y = 34 r is a fraction no solution.
18

After calculating (u3, v3) and the corresponding (x, y) we get r = 272 and m = 713. 713 714 Check 273 = 272 , which is correct. We can, of course, carry on to find other solutions. solving the general Pellian, provide other solutions to our equation, m 2 3mr + r 2 = 2r + 1 . Pellian in canonical form, (5r + 4) 2 5(2m 3r ) 2 = 4. (2) There is a spurious solution to x2 5y2 = 4: x = y = 1, which may, by using the method for

Note: the equation we started with, m 2 3mr + r 2 = 2r + 1 , was manipulated to produce a general

Problem The equation in the above example appears in the following problem: find possible values for the consecutive integers a, b and c which make the equation ax2 bx c = 0 have rational roots. Heronian triangles A triangle whose sides and area are all integers is known as Heronian. We saw that at least one of the sides of all PTs is even. Hence, all PTs are Heronian. (3, 4, 5) is a Heronian triangle with consecutive numbers as sides. Are there any other PTs with this property? Let the sides of the triangle be x 1, x, x + 1.
Herons formula for the area is A = s ( s a)( s b)( s c) , where s is half the perimeter = 3x / 2 and

a, b & c are the sides. 3x x+2 3x x 3x x2 sa = x +1 = ,s b = x = ,s c = x 1 = 2 2 2 2 2 2 3x x + 2 x x 2 3x 2 x 2 4 A2 = = 2 2 2 2 16 3 4u 2 4u 2 4) 2 For A to be an integer, x must be even. Let x = 2u A = = 3u 2 u 2 1 . 16 2 2 2 2 Also, we must have u 1 = 3v u 3v = 1. This is a Pellian with u1 = 2, v1 = 1 (by inspection) and u0 = 1 (v is not interesting). Hence, u n +1 = 2u1u n u n 1 = 4u n u n 1

2u n+1 = 8u n 2u n1

x n +1 = 4 x n x n1 , x1 = 2u1 = 4 & x0 = 2u 0 = 2.

The first triangle is (x1 1, x1, x1 + 1) = (3, 4, 5). x 2 = 4 x1 x0 = 4 4 2 = 14 The second triangle is (x2 1, x2, x2 + 1) = (13, 14, 15). Etc. We conclude that there are infinitely many Heronian triangles with consecutive numbers as sides and, with patience, we can find as many of them as we wish.

A bit more on Heronian triangles If we find two PTs sharing an equal side, we can place these two triangles side by side so that the equal sides coincide to get a Heronian triangle. We can, for instance, look for integers m, n, p and q such that 2mn = 2pq. This can be done a bit more systematically by the following observation: k(m2 n2), 2kmn and k(m2 + n2) form a PT. If we swap k and m we get another PT m(k2 n2),
19

2kmn and m(k2 + n2). These two PTs have a side, 2kmn, in common. Putting these two PTs side by side with the common sides coinciding we get the Heronian triangle (k(m2 + n2), |k(m2 n2) + m(k2 n2)|, m(k2 + n2)); or, (k(m2 + n2), (m + k)|(mk n2)|, m(k2 + n2)). We saw above how to find solutions to the equation x2 + y2 = u2 + v2. This can be written as x2 u2 = v2 y2 which helps us find more PTs sharing an equal side.

The Equation x3 + y3 + z3 = w3 Fermats Last Theorem asserts that the equation x3 + y3 = z3 has no solutions in integers. However, the equation x3 + y3 + z3 = w3 has infinitely many solutions starting with the obvious ones in the form x = w & y = z. In this problem x, y, z and w are positive or negative.
Euler and Binet found a method which provided an incomplete solution to this equation. This method is discussed in the book The Higher Arithmetic by H. Davenport and it provides the following parametric values for x, y, z and w (p and q are either positive or negative): x = 1 ( p 3q )( p 2 + 3q 2 ), y = 1 + ( p + 3q )( p 2 + 3q 2 ), z = ( p + 3q ) + ( p 2 + 3q 2 ) 2 , w = ( p 3q ) + ( p 2 + 3q 2 ) 2 .

Example: Let p = 1 and q = 1 x = 1 (1 3)(1 + 3) = 9, y = 1 + (1 + 3)(1 + 3) = 15, z = (1 + 3) + (1 + 3)2 = 12, w = (1 3) + (1 + 3)2 = 18. 93 + 153 + 123 = 183. Dividing through by 33 and rearranging, 33 + 43 + 53 = 63 = 216. (3, 4, 5) again!
Later, it was noticed that by putting p = 3q, we get x = 1, y = 1 + 72q3, z = 6q + 144q4 and w = 144q4. Putting 2q = t and rearranging, we get (1 9t3)3 + (3t 9t4)3 + (9t4)3 = 1, which shows that the number 1 can be represented as the sum of three cubes in an infinite number of ways. I will, now, show another method which, also, provides a partial solution to the given equation: Consider the curve C in the Oxy plane whose equation is y3 = x3 + a3 + b3. The point A( a, b) lies on C. We want to find the equation of the tangent to C at the point A and then see where this tangent meets C again (say at B). Since the point B lies on C, it follows that the coordinates of B (xB, yB), together with a and b, provide a solution to our equation yB3 = xB 3 + a3 + b3. By changing the numerical values of a and b, we get more and more solutions to our equation. Differentiating implicitly, we get 3y2y = 3x2 at A, y = a2 / b2 and the tangents equation is y b =
a 2 x + a3 + b3 = x3 + a 3 + b3 . Substituting this value of y in Cs equation, we get: b2
3 2 3 3 a2 (x + a ) y = a x + a2 + b . b2 b

20

Let a3 + b3 = c (a 2 x + c) 3 = b 6 x 3 + b 6 c (a 2 x + c) 3 b 6 x 3 b 6 c = 0. This is a cubic equation in x. We, already, know two of its roots: a and a (a double root). The product of the roots of the a cubic equation a 3 x 3 + a 2 x 2 + a1 x + a 0 = 0 is 0 . In our case, a3

a0 c3 b6c c (c 2 b 6 ) c(c b 3 )(c + b 3 ) a 3 (a 3 + 2b 3 ) = 6 = 3 = = = (a) 2 x B 6 3 3 3 3 3 3 3 a3 a b c(a b ) a b (a b )(a + b ) a (a 3 + 2b 3 ) a 3 b3

xB = yB =

1 a 6 2a 3 b 3 + a 6 b 6 2a 3 b 3 b 6 a 2 + a 3 + b 3 1 a (a 3 + 2b 3 ) b ( 2a 3 + a 3 + b3 = 2 = 2 a2 = 2 3 = b b2 b a3 b3 a 3 b3 b (a b 3 ) a3
3 3

b ( 2a 3 + b 3 ) a (a 3 + 2b 3 ) = + a 3 + b3. So, we have, at B: 3 3 3 3 a b a b

Multiplying through by (a3 b3)3 we get, (b(2a 3 + b 3 )) 3 = (a (a 3 + 2b 3 )) 3 + (a (b 3 a 3 )) 3 + (b(b 3 a 3 )) 3 ; b and a are positive, or negative, integers. This is the required (partial) solution.

Example: Let a = 1 and b = 2 (2(2 + 8))3 = (1 + 16)3 + (8 1 )3 + (2(8 1))3; or 73 + 143 + 173 = 203 =8000. Possible further investigations: * Number bases: In which bases the number 121 is a perfect square? We have b2 + 2b + 1 = (b + 1)2, which is always a perfect square b2 + 2b + 1 is a perfect square in all b > 2. In which bases the number 221 is a perfect square? We have 2b2 + 2b + 1 = (b + 1)2 + b2 = x2. This is sum of consecutive squares equals a square; possible values for b are 3, 20, Clearly, one can look at other quadratic polynomials in b and check whether they can be perfect squares in one base or another.
* Sums of consecutive squares equalling a square: It can be shown that the only solutions of the equation 12 + 22 + + x2 = y2 are (x, y) = (1, 1) and (24, 70). However, if we do not start with 12, it would, perhaps, be interesting to find values of k for which the sum of k consecutive squares is a square: k = 1: trivial. k = 2: 32 + 42 = 52, 202 + 212 = 292, etc. k = 3: we can write the equation in the form (x 1)2 + x2 + (x + 1)2 = y2; or, 3x2 + 2 = y2. The LHS is congruent to 2 modulo 3 but 2 is quadratic nonresidue modulo 3 there are no three consecutive squares adding up to a square. k = 4: (x 1)2 + x2 + (x + 1)2 + (x + 2)2 = y2; or, 4x2 + 4x + 6 = y2; or, (2x + 1)2 + 5 = y2
21

The LHS is congruent to 2 while the RHS is congruent to either 1 or 4 modulo 4 No solutions for k = 4. Etc. * Sums of consecutive triangular numbers equalling a triangular number x( x + 1) ( x + 1)( x + 2) y2 1 + = ( x + 1) 2 = y 2 8( x + 1) 2 = 1. 2 2 8 Solving this Pellian gives the required possible values for x and t (= (y 1)/2). k = 3: y ( y + 1) ( x 1) x x( x + 1) ( x + 1)( x + 2) = + + y 2 + y = 3 x 2 + 3 x + 2 12 y 2 + 12 y = 36 x 2 + 36 x + 24 2 2 2 2 2 2 3(2 y + 1) 3 = (6 x + 3) + 15 (2 y + 1) 2 = 3(2 x + 1) 2 + 6. The LHS must be divisible by 3; let 2y + 1 = 3v and 2x + 1 = u u2 3v2 = 2. Etc. k = 2: t = t x + t x +1 = *Polygonal numbers We have come across triangular numbers and square numbers; there are, also, pentagonal numbers, hexagonal numbers and, in general, s-gonal numbers (s stands for the number of sides). The general n formula for the nth s-gonal number is [(n 1)s 2(n 2 )] (see Recreations in The Theory of 2 Numbers by Albert H. Beiler). We have looked at triangular numbers which are, also, square; the sum of two squares equals a square (PTs), the sum of two triangular numbers a triangular number, etc. It is possible to extend this type of investigations into other polygonal numbers. Finally, Beilers book (mentioned above) is a marvellous source of problems and curiosities in number theory highly recommended. So is Vol. II of the book History of The Theory of Numbers by L. E. Dickson. November, 2011

22

You might also like