马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?欢迎注册
×
本帖最后由 mathematica 于 2019-1-26 15:04 编辑
- Clear["Global`*"];(*Clear all variables*)
- n=26816952863;
- m=n-1;s=0;
- While[Mod[m,2]==0,m=m/2;s=s+1];
- Do[t1=PowerMod[a,m,n];
- k=0;
- If[t1==1,Print[{a,k,t1,prime}];Continue[]];
- t2=t1;
- While[k<s-1&&t2!=n-1,k=k+1;t2=Mod[t2*t2,n]];
- If[t2==n-1,
- Print[{a,k,t2-n,prime}],
- Print[{a,k,composite}]
- ],
- {a,2,100}]
复制代码
这个伪素数是26816952863=18287*1466449=(41*446+1)*(3288*446+1)
运行结果
- {2,0,1,prime}
- {3,0,composite}
- {4,0,1,prime}
- {5,0,composite}
- {6,0,composite}
- {7,0,composite}
- {8,0,1,prime}
- {9,0,composite}
- {10,0,composite}
- {11,0,composite}
- {12,0,composite}
- {13,0,composite}
- {14,0,composite}
- {15,0,composite}
- {16,0,1,prime}
- {17,0,composite}
- {18,0,composite}
- {19,0,composite}
- {20,0,composite}
- {21,0,composite}
- {22,0,composite}
- {23,0,composite}
- {24,0,composite}
- {25,0,composite}
- {26,0,composite}
- {27,0,composite}
- {28,0,composite}
- {29,0,composite}
- {30,0,composite}
- {31,0,composite}
- {32,0,1,prime}
- {33,0,composite}
- {34,0,composite}
- {35,0,composite}
- {36,0,composite}
- {37,0,composite}
- {38,0,composite}
- {39,0,composite}
- {40,0,composite}
- {41,0,composite}
- {42,0,composite}
- {43,0,composite}
- {44,0,composite}
- {45,0,composite}
- {46,0,composite}
- {47,0,composite}
- {48,0,composite}
- {49,0,composite}
- {50,0,composite}
- {51,0,composite}
- {52,0,composite}
- {53,0,composite}
- {54,0,composite}
- {55,0,composite}
- {56,0,composite}
- {57,0,composite}
- {58,0,composite}
- {59,0,composite}
- {60,0,composite}
- {61,0,composite}
- {62,0,composite}
- {63,0,composite}
- {64,0,1,prime}
- {65,0,composite}
- {66,0,composite}
- {67,0,composite}
- {68,0,composite}
- {69,0,composite}
- {70,0,composite}
- {71,0,composite}
- {72,0,composite}
- {73,0,composite}
- {74,0,composite}
- {75,0,composite}
- {76,0,composite}
- {77,0,composite}
- {78,0,composite}
- {79,0,composite}
- {80,0,composite}
- {81,0,composite}
- {82,0,composite}
- {83,0,composite}
- {84,0,composite}
- {85,0,composite}
- {86,0,composite}
- {87,0,composite}
- {88,0,composite}
- {89,0,composite}
- {90,0,composite}
- {91,0,composite}
- {92,0,composite}
- {93,0,composite}
- {94,0,composite}
- {95,0,composite}
- {96,0,composite}
- {97,0,composite}
- {98,0,composite}
- {99,0,composite}
- {100,0,composite}
复制代码
n^0.5以下,似乎只有1 2 4 8 16 32 64 128 256"证明它是素数",
别的数都证明他是伪素数! |