- UID
- 184606
- 热情
- 8797
- 人气
- 12711
- 主题
- 60
- 帖子
- 655
- 精华
- 0
- 积分
- 11136
- 分享
- 0
- 记录
- 0
- 相册
- 1
- 好友
- 2
- 日志
- 0
- 在线时间
- 2425 小时
- 注册时间
- 2009-5-13
- 阅读权限
- 30
- 最后登录
- 2025-2-7
![Rank: 14](static/image/common/star_level3.gif) ![Rank: 14](static/image/common/star_level3.gif) ![Rank: 14](static/image/common/star_level3.gif) ![Rank: 14](static/image/common/star_level2.gif)
升级 ![](source/plugin/plbeautify/images/expl.gif) ![](source/plugin/plbeautify/images/expc.gif) 22.72% - UID
- 184606
- 热情
- 8797
- 人气
- 12711
- 主题
- 60
- 帖子
- 655
- 精华
- 0
- 积分
- 11136
- 阅读权限
- 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
查看全部评分
-
|