找回密码
 欢迎注册
查看: 13302|回复: 1

[擂台] 输出正则素数表

[复制链接]
发表于 2014-8-9 12:11:13 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?欢迎注册

×
关于正则素数: http://zh.wikipedia.org/zh-cn/正则素数

一个比较利于计算的定义为,如果p不整除$B_2,B_4,B_6,...,B_{p-3}$,那么p就是正则素数。$B_i$是伯努利数。
$$1+B_1 t+\frac{B_2 t^2}{2!}+\frac{B_3 t^3}{3!}+\frac{B_4 t^4}{4!}+...=\frac{t}{e^t-1}$$

恩斯特·库默尔在1847年就证明了如果n=p是正则素数,那么费马大定理成立。

如何尽可能高效率地输出指定n以内的正则素数表?

oeis上的正则素数列:http://oeis.org/A007703

另外,计算表明正则素数个数多于非正则素数,但是,已经证明了有无穷多个非正则素数,但是却还没有证明正则素数的个数无穷!大家怎么看,有什么相关资料吗?
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
 楼主| 发表于 2014-8-9 12:36:27 | 显示全部楼层
  1. s = {}; Do[p = Prime@n; k = 1; While[2k <= p - 3 && Mod[Numerator@BernoulliB[2k], p] != 0, k++ ]; If[2k > p - 3, AppendTo[s, p]], {n, 2, 80}]; s
复制代码
  1. is(p)=forstep(k=2, p-3, 2, if(numerator(bernfrac(k))%p==0, return(0))); isprime(p)
复制代码

以上是oeis提供的mathematica和pari代码

下面是一些正则素数
  1. 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 41, 43, 47, 53, 61, 71, 73, 79, \
  2. 83, 89, 97, 107, 109, 113, 127, 137, 139, 151, 163, 167, 173, 179, \
  3. 181, 191, 193, 197, 199, 211, 223, 227, 229, 239, 241, 251, 269, 277, \
  4. 281, 313, 317, 331, 337, 349, 359, 367, 373, 383, 397, 419, 431, 439, \
  5. 443, 449, 457, 479, 487, 499, 503, 509, 521, 563, 569, 571, 599, 601, \
  6. 641, 643, 661, 701, 709, 719, 733, 739, 743, 769, 787, 823, 829, 853, \
  7. 857, 859, 863, 883, 907, 911, 919, 937, 941, 947, 967, 977, 983, 991, \
  8. 997, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1063, \
  9. 1069, 1087, 1093, 1097, 1103, 1109, 1123, 1163, 1171, 1181, 1187, \
  10. 1213, 1223, 1231, 1249, 1259, 1277, 1289, 1303, 1321, 1361, 1373, \
  11. 1399, 1423, 1427, 1433, 1447, 1451, 1453, 1459, 1471, 1481, 1487, \
  12. 1489, 1493, 1511, 1531, 1543, 1549, 1553, 1567, 1571, 1579, 1583, \
  13. 1601, 1607, 1627, 1657, 1667, 1693, 1697, 1699, 1709, 1723, 1741, \
  14. 1747, 1783, 1801, 1823, 1861, 1867, 1873, 1907, 1913, 1931, 1949, \
  15. 1973, 1999, 2011, 2027, 2029, 2063, 2069, 2081, 2083, 2089, 2113, \
  16. 2129, 2131, 2141, 2161, 2179, 2203, 2207, 2221, 2237, 2243, 2251, \
  17. 2269, 2281, 2287, 2297, 2311, 2333, 2339, 2341, 2347, 2351, 2393, \
  18. 2399, 2417, 2437, 2447, 2459, 2467, 2473, 2477, 2521, 2531, 2539, \
  19. 2549, 2551, 2593, 2609, 2617, 2659, 2677, 2683, 2687, 2693, 2699, \
  20. 2707, 2711, 2713, 2719, 2729, 2731, 2741, 2749, 2797, 2801, 2803, \
  21. 2819, 2837, 2843, 2851, 2879, 2887, 2897, 2903, 2917, 2953, 2963, \
  22. 2969, 2971, 3001, 3019, 3037, 3041, 3067, 3079, 3109, 3121, 3137, \
  23. 3163, 3167, 3169, 3187, 3191, 3209, 3217, 3251, 3253, 3259, 3271, \
  24. 3299, 3301, 3307, 3319, 3331, 3343, 3347, 3359, 3361, 3371, 3373, \
  25. 3389, 3413, 3449, 3457, 3461, 3463, 3467, 3499, 3527, 3541, 3547, \
  26. 3557, 3571, 3623, 3643, 3659, 3673, 3691, 3701, 3709, 3719, 3727, \
  27. 3733, 3739, 3761, 3767, 3769, 3793, 3803, 3823, 3847, 3863, 3877, \
  28. 3889, 3907, 3911, 3919, 3923, 3929, 3931, 3943, 3947, 4007, 4013, \
  29. 4019, 4057, 4079, 4091, 4093, 4099, 4111, 4127, 4133, 4139, 4153, \
  30. 4159, 4177, 4201, 4211, 4217, 4229, 4231, 4241, 4253, 4271, 4273, \
  31. 4283, 4289, 4297, 4327, 4337, 4357, 4363, 4373, 4391, 4397, 4423, \
  32. 4441, 4447, 4463, 4481, 4483, 4507, 4513, 4517, 4547, 4549, 4567, \
  33. 4583, 4597, 4603, 4621, 4643, 4649, 4651, 4673, 4703, 4721, 4723, \
  34. 4729, 4733, 4759, 4787, 4789, 4799, 4801, 4817, 4831, 4871, 4877, \
  35. 4919, 4931, 4933, 4937, 4967, 4987, 4993, 4999, 5003, 5011, 5021, \
  36. 5023, 5051, 5059, 5087, 5113, 5147, 5153, 5171, 5197, 5233, 5237, \
  37. 5261, 5273, 5279, 5281, 5323, 5333, 5347, 5381, 5387, 5393, 5407, \
  38. 5417, 5419, 5431, 5437, 5449, 5471, 5483, 5503, 5507, 5519, 5521, \
  39. 5563, 5581, 5591, 5623, 5647, 5651, 5653, 5657, 5659, 5683, 5693, \
  40. 5711, 5717, 5737, 5741, 5743, 5749, 5779, 5801, 5807, 5827, 5843, \
  41. 5849, 5851, 5857, 5867, 5869, 5879, 5881, 5981, 5987, 6029, 6047, \
  42. 6053, 6067, 6073, 6079, 6089, 6113, 6121, 6131, 6133, 6143, 6151, \
  43. 6163, 6197, 6199, 6203, 6211, 6221, 6229, 6269, 6271, 6277, 6299, \
  44. 6301, 6311, 6323, 6353, 6359, 6361, 6389, 6397, 6427, 6469, 6473, \
  45. 6481, 6551, 6553, 6563, 6581, 6599, 6607, 6637, 6653, 6661, 6673, \
  46. 6679, 6691, 6703, 6709, 6719, 6737, 6761, 6781, 6791, 6803, 6829, \
  47. 6841, 6869, 6871, 6883, 6899, 6907, 6911, 6917, 6947, 6959, 6961, \
  48. 6967, 6977, 6983, 6991, 7013, 7019, 7027, 7043, 7079, 7103, 7129, \
  49. 7151, 7159, 7193, 7219, 7237, 7243, 7247, 7253, 7283, 7297, 7307, \
  50. 7331, 7333, 7349, 7369, 7393, 7417, 7433, 7451, 7457, 7477, 7481, \
  51. 7517, 7523, 7529, 7541, 7549, 7561, 7573, 7577, 7583, 7589, 7603, \
  52. 7621, 7639, 7649, 7669, 7673, 7699, 7703, 7717, 7723, 7741, 7753, \
  53. 7757, 7759, 7789, 7793, 7841, 7867, 7873, 7877, 7879, 7883
复制代码
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
您需要登录后才可以回帖 登录 | 欢迎注册

本版积分规则

小黑屋|手机版|数学研发网 ( 苏ICP备07505100号 )

GMT+8, 2024-11-21 21:28 , Processed in 0.023955 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表