梅森數 Mp=2p-1是素數的條件是(1) p 是素數 (2) Mp不能被任何2kp + 1這種型的數整除,其中k是整數且2kp + 1 < 2p-1. 它的孿生兄弟Kx=2x+1,其中x=2n. 它是素數的條件是Kx不能被任何2ix + 1這種型的數整除,其中i是整數且2ix + 1 < 2x+1. 例如K1=22+1=5, K2=24+1=17, K3=28+1=257, K4=216+1=65537都是素數. 但K5與K6不是素數. K5=232+1= 4294967297 = 641 * 6700417. 641 = (2)(32)(10)+1; x = 32 與 i = 10. 6700417 = (2)(32)(104694)+1; x = 32與 i = 104694. K6=264+1= 18446744073709551617 = 274177 * 67280421310721. 274177 = (2)(64)(2142)+1; x = 64 與 i = 2142. 67280421310721 = (2)(64)(525628291490)+1; x = 64與 i = 525628291490. 它比梅森數的優點是不需要確定P是素數.


The criteria for a Mersenne Number, Mp=2p-1 to be a prime are (1) p is a prime. (2) Mp can not be dividable by the form of 2kp+1; that k is a whole number and 2kp + 1 < 2p-1.  Note that Mp itself can be rewritten into the form of  2kp + 1, too. It’s variant Kx=2x+1; that x = 2n. It has an advantage over Mersenne numbers.  The criterion for it to be a prime is just that Kx can not be dividable by the form of 2ix + 1; that i is a whole number and 2ix + 1 < 2x-1. Note that Kx itself can be rewritten into the form of  2ix + 1, too. For examples: K1=22+1=5, K2=24+1=17, K3=28+1=257,and K4=216+1=65537 are prime numbers.  However, K5 and K6 are not a prime. K5=232+1= 4294967297 = 641 * 6700417. 641 = (2)(32)(10)+1; x = 32 and i = 10. 6700417 = (2)(32)(104694)+1; x = 32 and i = 104694. K6=264+1= 18446744073709551617 = 274177 * 67280421310721. 274177 = (2)(64)(2142)+1; x = 64 and i = 2142. 67280421310721 = (2)(64)(525628291490)+1; x = 64 and i = 525628291490.

arrow
arrow
    全站熱搜

    mcheng007 發表在 痞客邦 留言(0) 人氣()