Factors of a Mersenne number: Difference between revisions

m
Clarified the 2kP+1 formula, p --> P
m (Clarified the 2kP+1 formula, p --> P)
Line 12:
27*27 = 729 1 729*2 = 1458 1
 
Since 2<sup>23</sup> mod 47 = 1, 47 is a factor of 2<sup>P</sup>-1. (To see this, subtract 1 from both sides: 2<sup>23</sup>-1 = 0 mod 47.) Since we've shown that 47 is a factor, 2<sup>23</sup>-1 is not prime. Further properties of Mersenne numbers allow us to refine the process even more. Any factor q of 2<sup>P</sup>-1 must be of the form 2kp2kP+1. Furthermore, q must be 1 or 7 mod 8. Finally any potential factor q must be [[Primality by Trial Division|prime]]. As in other trial division algorithms, the algorithm stops when 2kp2kP+1 > sqrt(N).
 
This method only works for Mersenne numbers where P is prime (M<sub>27</sub> yields no factors).