MathTop

pseudo_primitive_root 函数

返回乘法阶达到该模数 Carmichael lambda 值的剩余类。

语法

  • NumberTheory:-PseudoPrimitiveRoot(m)
  • PseudoPrimitiveRoot(m)
  • PseudoPrimitiveRoot(m, greaterthan = n)
  • PseudoPrimitiveRoot(m, ith = k)
  • pseudo_primitive_root(m)

参数与选项

m大于 1 的模数。
greaterthan可选下界;返回大于该值的第一个伪原根。
ith可选的一基索引,在模 m 的有序伪原根中取值。

示例

  1. 伪原根PseudoPrimitiveRoot(8)返回 3。
  2. 下界选项PseudoPrimitiveRoot(8, greaterthan = 3)返回 5。
  3. 按序号取伪原根PseudoPrimitiveRoot(8, ith = 3)返回 7。