2006-10-5 23:07
Z_Artemis
只有一句话的、很简单的数学题(没想出来…)
求第一个(最小的)以 [color=Red]2^2^n +1[/color] 的形式出现的合数(非质数),并给出它的质因数。(n取正整数)
——————————————————
看起来好简单啊……实际上也很简单:qDD+
[[i] 本帖最后由 Z_Artemis 于 2006-10-5 23:12 编辑 [/i]]
2006-10-6 21:58
青石
n=5
641*6700417
2006-10-6 22:20
夜雨落枫
[quote]原帖由 [i]青石[/i] 于 2006-10-6 21:58 发表
n=5
641*6700417 [/quote]
LS正解
2006-10-7 00:09
Z_Artemis
这个……很感兴趣是怎么求出来的~~
2006-10-8 12:39
KYOKO
好大
看上去就没那么简单...
2006-10-9 21:24
星义
其实这种题目解法很简单,就是N从1开始代入计算,算到第几个是了就是几。
2006-10-10 19:05
Z_Artemis
佩服楼上……
重点是您怎么找到那两个鬼死大的质因数?
2007-3-9 17:06
翔于我心
这题目来源于费尔马的一个猜想,所以,也很容易到网上找到答案。
2007-3-12 10:39
天宫公主
重点是您怎么找到那两个鬼死大的质因数?
(Maple prompt)
> ifactor(2^(2^5) + 1);
:()
2007-3-12 14:47
djgan
回复 #9 天宫公主 的帖子
:mellow:发现用MATLAB判断2^(2^5)是否质数会报错:
>> X=1:4
X =
1 2 3 4
>> Y= 2.^(2.^X) +1
Y =
5 17 257 65537
>> isprime(Y)
ans =
1 1 1 1 %可以判断X=1,2,3,4时候,Y都是质数
>> X=1:5
X =
1 2 3 4 5
>> Y= 2.^(2.^X) +1
Y =
1.0e+009 *
0.0000 0.0000 0.0000 0.0001 4.2950
>> isprime(Y)
??? Error using ==> isprime
The maximum value of X allowed is 2^32. %2^(2^5) 就没法判断了:(
而且无法求2^(2^5) + 1的因子
>> factor(2^(2^5) + 1);
??? Error using ==> factor
The maximum value of n allowed is 2^32.
:ph34r:>>help factor
FACTOR Prime factors.
FACTOR(N) returns a vector containing the prime factors of N.
This function uses the simple sieve approach. It may require large
memory allocation if the number given is too big. Technically
it is possible to improve this algorithm, allocating less
memory for most cases and resulting in a faster execution
time. However, it will still have problems in the worst
case, so we choose to impose an upper bound on the input number
and error out for n > 2^32.
[[i] 本帖最后由 djgan 于 2007-3-12 14:51 编辑 [/i]]
2007-3-24 17:24
fy945
这个和“完全数”有很大的关系,用google搜索完备数、完全数就知道了。
2007-4-28 19:23
书者
[quote]原帖由 [i]Z_Artemis[/i] 于 2006-10-5 23:07 发表
求第一个(最小的)以 2^2^n +1 的形式出现的合数(非质数),并给出它的质因数。(n取正整数)
——————————————————
看起来好简单啊……实际上也很简单:qDD+ [/quote]
这不是费马一个错误猜想吗?然后欧拉推翻的,我们中学课本上有,学过不久
页:
[1]
Powered by Discuz! Archiver 5.0.0
© 2001-2006 Comsenz Inc.