14 ms·
Huh, I never realized this was this simple. Fleshing out the general case the post mentions. Suppose p=x^n-1 is prime. Note that: x^n - 1 = (x^n + x^(n-1)
by Tomminn 8y ago
Huh, I never realized this was this simple. Fleshing out the general case the post mentions.
Suppose p=x^n-1 is prime.
Note that:
x^n - 1 = (x^n + x^(n-1) +... + x^2 + x)
-( x^(n-1) +... + x^2 + x +1)
=>x^n-1 = (x^(n-1) + x^(n-2) + ... + x + 1)(x-1)
So if p=x^n-1 is prime, one of the factors must be equal to 1. If the first factor is 1, this implies x=0 and so the second factor is -1. Therefore the second factor must be 1, and x=2.
Therefore if x^n-1 is prime, x must be 2. Damn that's cool. At first I thought any number 2^n-1 would be prime, but then I realized that obviously the left hand factor can have subfactors. Which is to say I remembered 15 exists.
- jpegslayer 8y agoWhat about for n=4? I think the issue is that you're supposing that 2^n-1 is already prime. Primes of this form are called Mersenne primes if you want more information on them.
- Tomminn 8y agoSee update, I realized my facepalm at roughly the same time as you:)
- bwasti 8y agonot only that, but if p is prime and p = 2^n-1 then n is also prime proof: https://jott.live/texdown/mersenne https://jott.live/texdown/mersenne
- tejtm 8y ago> if p is prime and p = 2^n-1 then n is also prime for clarity p = (2^n)-1