April II, 1889] 



NATURE 



559 



I 



Factors of Numbers, 



The processes given by Mr. Busk at p. 413 of Nature are 

 an interesting step towards the practical solution of the difficult 

 problem of finding the factors of any number. In this article 

 the processes are put in an algebraic foim, which both shows 

 more clearly the nature of the processes, and brings out the con- 

 ditions necessary for their practiial success (i.e. with any 

 moderate labour) : it will appear that with high numbers the 

 labour involved would be prohibitory except in ^ favourable 

 cases. 



Let N be the number to be resolved into factors. Rejecting 

 even numbers as obviously divisible by 2, odd numbers only 

 require to be considered. If two integers, A, B, can be found 

 such that — 



N = A" - B2, 



the problem is solved, the factors being (A + B), (A - B). 

 There is one universal solution which includes primes, viz. 



A + B = N, A - B = I ; A = i(N + I), B = ^N- i). 



The problem is to find other solutions, if any exist. Certain 

 limits may be at once assigned to A, B, viz. 



(1) A, B are minima together, viz. 



A = sj'^, B = o, when N is a perfect square. 

 A = v'JN + a (the integer next > x/^^). and B = VaT^^N 

 = o, when N is not a perfect square. 



(2) A, B are maxima together, viz. when they are successive 



integers. This gives the universal solution above. 

 This gives a very wide range, wider for B than for A, viz. 



A from VN to ^N + i), B from o to |(N - i). 



The two processes of Mr. Busk, somewhat generalized, amount 

 virtually to this. Try first if N be a perfect square : if so, the 

 factors are ^/N, sj^. Next, if N be not a perfect square, 

 assume any trial integer value for either A or B (within above 

 limits, of course). Then, if either (A^ - N), (B^ + N) be a 

 perfect square, it is the other sought square B'^ or A", and the 

 thing is done. 



But, if not, let A be increased, or let B be decreased -by 

 some integer r, such that (A + ;-), B - ;-) lie within above 

 limits ; then, if either {(A + rf - N} or {B - r)"- + NJ be a 

 perfect square, it is the other sought square, viz. B- or A-', and 

 the thing is done. 



To do this thoroughly, i.e. to make certain of not missing ihe 

 right value of {A + r) or (B-r), it seems absolutely necessary 

 to work systematically, i.e. either — 



(i. ) begin with the minimum value A = integer next > .^N, 



and work upwards, or — 

 (ii.) begin with the maximum value B = ^(N - i), and work 

 downwards, 

 trying all integer values of r in succession, r = i, 2, 3, &c., 

 until a perfect square is reached, or until, finally, the maximum 

 value of ;• is reached, given by — 



(i.) A + r = i(N + I), which gives B = i(N- i), 

 (ii.) B - ;■ = o, which gives A^ = N, which is by hypothesis 

 not a perfect square, 

 which ends the process, and shows conclusively— if no perfect 

 square be reached earlier— that N is a prime. 



An important practical help in working either process is given 

 by Mr. Busk, in a simple way of forming the successive quan- 

 tities ^(A + ;)"-Nf, ;(B-r)2 + N} by the successive addition or 

 subtraction of a series of simple "differences," thus — 



(o) Write down the starting quantity, (A"-^-N) or (B^ -h N). 

 (i) Add (2A + I) or subtract '(2B-1), giving results 



{(A -I- 1)2 -N|- or {(B- I)-' + N}, 

 (2) Add (2A + 3) or subtract (2B - 3) more, giving results 

 {(A + 2)2 - N} or KB - 2)2 + N[, 

 and so on ; and as the rth step — 



(;-) Add (2A -I- 2r- i) or subtract (2B -2^-1) inore, giving 



results {(A + ;-)'-- NJ or {(B-r)- + N}. 

 Nothing simpler could be wished than this as a process, espe- 

 cially as it is exactly suited to be done mechanically upon an 

 arithmometer. 



The labour liable to be involved in the work is a serious prac- 

 tical drawback. Both processes are rapid when ;- is small, and 

 ' Mr. Busk's examples are favourable case;. 



tedious when r is large. Process (i.) is most rapid when the 

 factors are nearly equal, and process (ii.) when they are ex- 

 tremely unequal ; but as these conditions cannot be recognized 

 a priori, selection of either process is only guesswork. A suit- 

 able selection of the starting numbers A, B, i.e. by taking A 

 higher than the minimum (and yet not too high), or by taking 

 B lower than the maximum (and yet not too low), may of course 

 immensely shorten the process ; but such selection is at present 

 pure 1 guesswork. In fact, if with such arbitrary starting values 

 of A, B, a perfect square is not reached by the end of the pro- 

 cess, no conclusion can be drawn, but the process must be tried 

 again with values of A, B nearer to the really safe starting 

 values. Both processes are most tedious of all for prime numbers, 

 when the number of steps (r) required is — 



In (i.), r = J(N + l) - JW^a ; in (ii.), r = ^(N - i), 



a number so large as to be practically prohibitory for high 

 numbers. 



Some shortening process is much required. One such is 

 proposed (on p. 414) for odd numbers, but (unless it has been 

 misunderstood by the writer) it is certainly not so in general. It 

 appears to amount to this : — 



If N be not a perfect square, subtract it from the two next higher 

 squares, thus forming i(A + l)^ - N} and {A^ - N}. If either 

 of these be perfect squares, the question is solved by what 

 precedes ; but, if not, subtract them from any two successive 

 higher squares of say (C -t- i), C, such that (C - A) is an odd 

 number, thus forming — 



[(C + 1)2 - {(A + 1)2 - NHand [C^ - (A^ - N)], 

 and divide each of these by their difference, i.e. by 2(A - C). 



If they be not evenly divisible, increase the number C by the 

 even integers, 2, 4, 6, &c., successively, trying the divisions again 

 at each step, until after say m steps, the two results 

 [(C -f- zm + 1)2 - {(A -f 1)2 - N}], [(C -(- 2/«)2 - (A2 - N)]. 



are both evenly divisible by their difference, i.e. by 2(A - C + 2m). 

 To the quotients so formed add the original quantity (A + i) or 

 A, as the case may be. 



The two resulting quantities will be found (on reduction) to 

 reduce alike to the simple form — 



(■>^ V 



^ + P j. where P = (A - C + 2m) for shortness, 



and this turns out to be actually the larger of the two numbers 

 whose square is sought, since its square exceeds N by a perfect 

 square, for — 



[-(f + ^)T" ^^ = [Hf - P)jM^erfect square, 



and the two factors are now seen to be _ and P. 



P 



The process thus appears to be really a roundabout way of 

 finding by repeated trial the smaller factor P or (A - C -I- 2m). 

 Direct trial division of N by the series of factors A, (A - 2), 

 (A - 4), &c., would probably be simpler. In applying the 

 author's process it seems essential — in order to avoid missing 

 the right value of(C 4- 2/;/)— to start with the lowest value 

 C = o or I (according as A is odd or evenV and work steadily 

 on until an even division by (A^-^C -f 2in) is reached, ending 

 finally with the value A - C + 2w = i, which would show 

 conclusively— if no even division be reached earlier — that N is 

 a priuae ; but if the start be made with a higher value of C, and 

 no even division be met with till the final step of A - C + 2»i = i, 

 then no - conclusion can be drawn, and a fresh start must be 

 made with a lower value of C. 



The process will be rapid when m is small — i.e. when the 



' Mr. Busk's e.xample of process (ii.) (Nature, p. 415) is a good instance 

 of a purely lucky success in starting with B = integer next < v'N. Let the 

 f.nme be tried on N = 69, 93, 125. &c., and it wiil fail (such a start being, in 

 fact, illegitima;e\ Mr. W. H. H. Hudson's statement (Naturk. p. 5*1), 

 that process (ii.) is " not one rf general application," failing, for instance, 

 for N = 32J171, is a mistake : it (ails solely from starting with B too low. 

 The values m process (ii.)are : A = 2250, B — r = 2177, and N = 4427 x 73 : 

 this process will of course fail if started with a value ( f B < 2177- This is a 

 gi'od instance of a ca^e very tedious by either process : in fact, the number 

 of steps necessary (if worked without guesswork) w. II befounj to be r = 1681 

 by process (i.) and 159 408 by process (ii.), wh'ch are practically prohibitory. 



- Mr. Busk's example on p. 414 of Nature is a good instance of this. 

 Applying it to ihe number N = 73, the start is made wuh the value C = 6 ; 

 the rrocess ends really with showing that 73 = 37"-* - 36-, and does not (of 

 itself) warrant the inference that 73 is a prime. 



