|
PowerMod
PowerMod[a, b, n] gives .
For negative b, PowerMod[a, b, n] gives modular inverses.
Integer mathematical function (see Section A.3.10).
For positive b, PowerMod[a, b, n] gives the same answers as Mod[a^b, n] but is much more efficient.
For negative b, PowerMod[a, b, n] gives the integer such that . If no such integer exists, PowerMod returns unevaluated.
See Section 3.2.4.
See also: Mod, ExtendedGCD, MultiplicativeOrder, EulerPhi.
Related package: Algebra`PolynomialPowerMod`.
New in Version 1.
Further Examples
|