1874.] On the Determination of a Prime Number. 381 



II. " Given the Number of Figures (not exceeding 100) in the 

 Reciprocal of a Prime Number, to determine the Prime itself." 

 By WILLIAM SHANKS. Communicated by the Rev.G. SALMON, 

 F.R.S. Received May 19, 1874. 



In a former communication (swpra, p. 200) I gave a Table showing the 

 number of figures in the period of the reciprocal of every given prime up to 

 20,000. The Table here introduced is intended to solve the converse pro- 

 blem, and to show what primes have a given number of figures in their 

 period. It appears at once, from the ordinary rule for converting a pure cir- 

 culating decimal into a proper fraction, that if the reciprocal of a prime have 

 n figures in its period, that prime must be a factor in the number formed 

 by writing down n nines, and therefore also, generally, in the number 

 formed by writing down n ones. We denote that number by n; that is 

 to say, 5 (in the left column), for example, =11111, except where 

 3, 3 2 , 3 3 . . . .3 6 are concerned, when we have 3, for example, =999. The 

 problem now before us is equivalent to that of breaking up n into its 

 prime factors ; and the previous Table gives us great facility in doing 

 this, for it exhibits every factor of n which is less than 20,000* ; and if, 

 after accounting for all these, the remaining factor of n is less than 

 30,000 2 , we may be sure that it is a prime number, and that the resolu- 

 tion is complete. 



If we have to deal with a composite number mn, this may obviously be 

 written down either as m groups of n ones or as n groups of m ones. It 

 follows that mn contains m and n as factors. "We may also state here that 

 12, besides the factor 9901, obviously has all the factors belonging to any 

 submultiple of 12, e.g. 2, 3, 4, 6 ; and that this holds in all other similar 

 cases, and need not be stated again. When we affirm that the resolution 

 in any case is complete (and, indeed, throughout the Table), it is to be 

 clearly understood that the submultiples have all been carefully attended 

 to, and thus any result may easily be verified. The high factors found 

 (those, we mean, above 30,000 2 ) have involved considerable labour ; and 

 though we may not say absolutely that they are primes, yet we are 

 certain that, if composite, their component factors are primes each 

 greater than 30,000, and that the periods of their reciprocals have readily 

 been found. It only remains to add here that the left column contains 

 the given number of figures in the reciprocal of the prime or primes 

 found and placed opposite in the right column, or, in a few cases, of the 

 second powers of primes, and as far as the sixth power of the prime 3. 



If the number of figures in the reciprocal of P be n, then the general 

 rulet, which may be drawn from particular cases such as the following 

 two, is that the number of figures in the reciprocal of P 2 is nP, of P 3 is 



* In point of fact I have carried on the calculation up to 30,000. 

 t See 'Messenger of Mathematics,' vol. ii. pp. 41-43 (1872), and vol. iii. pp. 52-55 

 (1873). 



