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 的有序伪原根中取值。 |
示例
- 伪原根
PseudoPrimitiveRoot(8)返回 3。 - 下界选项
PseudoPrimitiveRoot(8, greaterthan = 3)返回 5。 - 按序号取伪原根
PseudoPrimitiveRoot(8, ith = 3)返回 7。