CHAP. XII] PELL EQUATION, ax 2 +bx+c = D. 359 



If R is a prime, (B) gives xy' yx' = qR, whence, by (A), xx' d= ayy' = pR, 

 where 5 and p are integers. Thus, by (A), p 2 - aq 2 = 1. Next, let 

 E = A.5, where A and 5 are primes. By (B), one of xy' + 2/0;', rn/' - yx' 

 is divisible by A, or one by A and the other by B. In the first case we 

 have the same result as when R was a prime. In the second case, 

 xy' db yx' = qB, where g is an integer not divisible by A. Then (A) gives 

 xx' d= a?/?/' = p.B, whence 

 (C) p 2 - < = A 2 . 



Arguing similarly with a third equation x" : ay"' 1 = R of our set, in con- 

 junction with x 2 -- ay 2 = R, we get p? ogf = = A 2 . Treating this and 

 (C) as we did our first pair, we get a solution of r 2 - as 2 = 1. A similar 

 treatment is made for the case in which R is a product of several primes or 

 is an arbitrary number. 



Second, let R = 6T, a = 6b be not relatively prime. To treat the first 

 of two analogous cases, let 6 be not divisible by a square. Then x = 6u and 

 T = 6u 2 - bif. Hence T 2 = (By? + by 2 } 2 - a(2uy} 2 . Since T 2 and a are 

 relatively prime, we may employ this equation in place of the former 

 x 2 ay 2 = R. Hence there exist solutions of x 2 ay 2 = 1 and we have 

 a process to find them. 



If p 2 - aq 2 = 1, then x 2 - ay 2 = 1 for 



x + y4a = E = (p + gVa) w , x - yJa = F = (p - 

 and 



(12) x = 



are expressed as polynomials in p, q, a. If p, q is the least positive solution, 

 then (12) gives all the solutions, m being an integer. All solutions occur 

 among the sets (M, N), (M', N')_, given by the convergents M/N, 

 M'/N'y - - - to Va, and each is > Va. If m is a prime, and if x, y are given 

 by (12), x p and y qa (m ~ 1)l2 are divisible by m; hence, if r is the residue 

 (0 or dz 1) of a (m ~ 1)/2 modulo m, and if p', q' are given by (12) with m replaced 

 by m r, then p' 2 aq'' 2 = 1, and q' is divisible by m, and either p' p 

 or p' 1 is divisible by m according as r = or r =(= 0. Likewise when in 

 (12) m is replaced by M = n(m r)(m' r'} , where m, m', are 

 odd primes and r' is the residue of a (m '~ 1)/2 modulo m', etc., n being any 

 positive integer, x 2 ay 2 = 1 and y is divisible by N mm' , and either 

 x p or x 1 is divisible by N according as M is odd or even. After 

 giving numerical examples illustrating what precedes, Lagrange stated that, 

 if a is not a sum of two squares, no number is simultaneously of the forms 

 x 2 ay 2 , CM/I #ij but was not certain of the converse [cf. Legendre 88 ]. 

 If x 2 ay 2 = R and x\ ay\ = R, and if R is a prime, we can solve 

 p 2 aq 2 = I, and conclude that every number of the form x 2 ay 2 is 

 also of the form ay\ x\. By squaring t 2 au 2 = 1, we get solutions 

 (12) of x 2 ay 2 = 1 ; hence p d= q Va must be the square of a quantity 

 r d= s Va, whence p = r 2 -\- as 2 , q = 2rs. Hence t 2 au 2 = 1 is impossible 



