DOCUMENTATION CENTER SEARCH
Mathematica
>
Number Theory
>
Built-in
Mathematica
Symbol
Integer and Number Theoretic Functions
Tutorials »
|
Mod
Power
PowerModList
ExtendedGCD
MultiplicativeOrder
EulerPhi
PrimitiveRoot
See Also »
|
Cryptographic Number Theory
Diophantine Equations
Integer Functions
Number Theoretic Functions
Number Theory
More About »
PowerMod
PowerMod
[
a
,
b
,
m
]
gives
a
b
mod
m
.
PowerMod
[
a
, -1,
m
]
finds the modular inverse of
a
modulo
m
.
PowerMod
[
a
, 1/
r
,
m
]
finds the smallest modular root of
a
.
MORE INFORMATION
Integer mathematical function, suitable for both symbolic and numerical manipulation.
For positive
b
,
PowerMod
[
a
,
b
,
m
]
gives the same result as
Mod
[
a
^
b
,
m
]
but is much more efficient.
PowerMod
[
a
,
b
,
m
]
allows negative and rational values of
b
. It returns unevaluated if the corresponding modular inverse or root does not exist.
PowerMod
automatically threads over lists.
EXAMPLES
CLOSE ALL
Basic Examples
(1)
In[1]:=
Out[1]=
In[2]:=
Out[2]=
Scope
(3)
Possible Issues
(1)
SEE ALSO
Mod
Power
PowerModList
ExtendedGCD
MultiplicativeOrder
EulerPhi
PrimitiveRoot
TUTORIALS
Integer and Number Theoretic Functions
MORE ABOUT
Cryptographic Number Theory
Diophantine Equations
Integer Functions
Number Theoretic Functions
Number Theory
RELATED LINKS
NKS|Online
(
A New Kind of Science
)
New in 1
© 2008 Wolfram Research, Inc.