- UID
- 184606
- 热情
- 8557
- 人气
- 12471
- 主题
- 59
- 帖子
- 654
- 精华
- 0
- 积分
- 10895
- 分享
- 0
- 记录
- 0
- 相册
- 1
- 好友
- 2
- 日志
- 0
- 在线时间
- 2418 小时
- 注册时间
- 2009-5-13
- 阅读权限
- 30
- 最后登录
- 2024-11-8
升级 17.9% - UID
- 184606
- 热情
- 8557
- 人气
- 12471
- 主题
- 59
- 帖子
- 654
- 精华
- 0
- 积分
- 10895
- 阅读权限
- 30
- 注册时间
- 2009-5-13
|
2^n - 1 = 1 + 2 + 2^2 + ... + 2^(n-1), n terms.
If n is even, then:
2^n - 1 = (1+2) + (2^2 + 2^3) + ... + (2^(n-2) + 2^(n-1))
= (1+2) + 2^2(1 + 2) + ... + 2^(n-2)(1 + 2)
= (1+2) [1 + 2^2 + ... + 2^(n-2)]
= 3 [1 + 2^2 + ... + 2^(n-2)]
So n even => 3 divides 2^n - 1
If n is odd:
2^n + 1 = 2 + 2^n - 1
= 2 + 1 + 2 + 2^2 + ... + 2^(n-1)
= 3 + 2 + 2^2 + ... + 2^(n-1)
= 3 + (2 + 2^2) + (2^3 + 2^4) + ... + (2^(n-2) + 2^(n-1))
= 3 + 2(1+2) + 2^3(1+2) + ... + 2^(n-2) (1+2)
= 3 [1 + 2 + 2^3 + ... 2^(n-2)]
So n odd => 3 divides 2^n + 1
So, if 2^n - 1 is prime, n cannot be even; so n is odd, and 2^n + 1 is not prime.
And if 2^n + 1 is prime, n cannot be odd; so n is even, and 2^n - 1 is not prime. |
-
1
查看全部评分
-
|