【问题标题】:How to construct fields in bnfinit()?如何在 bnfinit() 中构造字段?
【发布时间】:2018-02-26 11:11:39
【问题描述】:

我是 PARI/GP 的新手,正在学习不同的数字字段。我正在尝试使用 bnfinit(第 23 个分圆场)构建字段 k = Q(\zeta_23) 以运行以下脚本:

v=[]; w=[]; j=0; l=0;
forprime(p=29, 100000, {
    if(p%46==1, j++; if(#bnfisintnorm(k,p)>0,l++;w=[p];v=concat(v,w)))
});
print("Up to 100000 there are ",j," primes congruent to 1 mod 46 and ",l," are norms of principal ideals")

跑到GP会报这个错误,

<=1,j++;if(#bnfisintnorm(k,p)>0,l++;w=[p];v=concat(v,w))));print("Up to 100000 there are ",j," primes congruent to 1 mod 46 and ",l," are norms of principal ideals")

***   at top-level: ...00000,if(p%46==1,j++;if(#bnfisintnorm(k,p)>0,
***                                             ^--------------------
*** bnfisintnorm: incorrect type in checknf [please apply nfinit()] (t_POL).
(18:29) gp >

这应该找到素数 p 使得域 K 中有代数整数,范数 p。

有什么帮助吗?谢谢。

【问题讨论】:

    标签: algorithm pari pari-gp


    【解决方案1】:

    您可以将所需的数字字段定义为k = bnfinit(polcyclo(23))。所以你的代码会输出:

    gp> Up to 100000 there are 429 primes congruent to 1 mod 46 and 141 are norms of principal ideals
    

    希望,它会有所帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2010-11-28
      • 1970-01-01
      • 2013-08-08
      • 1970-01-01
      • 1970-01-01
      • 2018-05-23
      • 1970-01-01
      • 2020-07-13
      相关资源
      最近更新 更多