360 HISTORY OF THE THEORY OF NUMBERS. [CHAP. XII 



unless p, q are of this form; and if they are, the resulting t, u give the least 

 solutions. 



Lagrange 75 gave a direct method to solve a + bt 2 = u- in integers. 

 Removing the factors common to t and u, it suffices to treat 



(13) A = p 2 - Bq 2 , 



where p, q are relatively prime. If B is negative, we may assume that 

 | A | > B, since otherwise pq = 0. If B is positive, we here assume that 

 A 2 > B, treating later the contrary case. Choose integers p : , qi such 

 that pqi qpi = d= 1, and multiply (13) by A\ = pi Bq*. Thus 

 = a 2 B, where a = pp v Bqqi. Since a 2 B is divisible by A, 

 a) 2 B is divisible by A, and juA a can be made numerically 

 < | A |/2 by choice of ju- Hence if a 2 B is divisible by A for no value of 

 a < | A |/2, (13) is not solvable. If such an a exists, the problem reduces 

 to the solution of 



(14) A, = p\ - Bqt, | A, | < A . 



If solutions of the latter are found, we deduce solutions 



of (13) from pp^ - - Bqq : = a, pq l qpi = db 1. If, in (14), B < or if 

 B > 0, A\ > B, we proceed as before and see that (14) reduces to the 

 solution of 



A 2 = pi Bql, ai < I AI , \A z <\Ai. 



The case B > 0, Ai* < B, falls under that treated later. Thus, unless such 

 a postponed case arises at some stage, we shall finally reach, if B is negative 

 (B = &), a term A n such that | A n = b or < 6. If |A n = fc, we 

 have 6 = pi + &#, whence # = or 1 and (13) is solved. If A n \ < b, 

 then q n = 0. But, if B is positive, we reach a term a n = e, where e < ^B, 

 and A n A n+1 = e 2 - B. Thus A n = E, A n +i = =F D, where D and # 

 are positive and DE = B e 2 . Moreover, 



T D = p 2 - Be 2 , db E = r 2 - Bs 2 , 



the solution of one of which implies that of the other. Since DE < B, 

 one of the equations is of the next type. 



The postponed type is d= E = r 2 - - Bsr, where E < V, B > 0. 

 We first seek ( 34, p. 435) an integer e, -^B > e > V# - E, such that 

 B e 2 is divisible by E. If no such e exists, the equation is impossible in 

 integers. In the contrary case, take a particular e, and determine uniquely 

 integers E i} e,-, X; by means of the equations 



EE, = B - e 2 , EiE 2 = B - ;, E 2 E 3 = B - el, 



ei = Xi-E"i e, 62 = Xo-E^ *i, *3 = Xs-E/s 2, > 



. Acad. Berlin, 23, ann6e 1767, 1769, 242; Oeuvrcs, 2, 1868, 406-495. German transl. 

 by E. Netto, Ostwald's Klassiker, No. 146, Leipzig, 1904. 



