PowerMod
Assuming "PowerMod" is a Wolfram Language symbol | Use as instead

Input interpretation

PowerMod (Wolfram Language symbol)

Usage

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 a modular r ^th root of a.

Basic examples

Compute 2^10 mod 3:
In[1]:=PowerMod[2, 10, 3]
Out[1]=1
Plot the sequence with fixed powers:
In[1]:=DiscretePlot[PowerMod[m, 2, 11], {m, 1, 50}]
Out[1]=
Plot the sequence with varying powers:
In[1]:=DiscretePlot[PowerMod[3, b, 11], {b, 1, 50}]
Out[1]=

Attributes

Listable | Protected | ReadProtected

Typical ranks of usage in programs

Frequency of usage in all corpuses

607th most common (1 in 35600 symbols)

Rank of usage in the Wolfram Demonstrations Project

855th most common (1 in 168000 symbols)

Rank of usage in the Wolfram documentation

999th most common (1 in 18800 symbols)

History

Version introduced or modified

introduced in Version 1 (June 1988)

Timeline

Timeline