Sponsored links: Algebra eBooks
 

Help Index

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

The Maxima on-line user's manual

Algebra Calculator

Search:

Inv_mod Calculator

Inv_mod

Function: inv_mod (<n>, <m>) Computes the inverse of <n> modulo <m>. inv_mod (n,m) returns false, if <n> is a zero divisor modulo <m>.

p:47;
q:59;
n:p*q;
phi_n: (p-1)*(q-1);
e:65;
gcd(e,phi_n);
d:inv_mod(e,phi_n);
e1:inv_mod(d,phi_n);
m:65;
c:power_mod(m,e,n);
power_mod(c,d,n);

          (%i1) inv_mod(3, 41);
          (%o1)                           14
          (%i2) ratsimp(3^-1), modulus=41;
          (%o2)                           14
          (%i3) inv_mod(3, 42);
          (%o3)                          false

(%o1)                                true
(%i2) 

Inv_mod Example

Related Examples

inv_mod-mod

inv_mod(3,11);

Calculate

inv_mod-mod-phi-print

/* First find the pri...

n : 4189;

P: 18909736861978...

Calculate

inv_mod-mod

inv_mod(5,36);

Calculate

inv_mod-mod

inv_mod(35,11);

Calculate

inv_mod-mod

inv_mod(26,59);

Calculate

inv_mod-mod

inv_mod(35,3);

Calculate

inv_mod-mod

inv_mod(29,59);

Calculate

inv_mod-mod-power_mod

inv_mod(5,1452);

inv_mod(33,7);

inv_mod(21,11);

Calculate

inv_mod-mod

inv_mod(7,880);

Calculate

inv_mod-mod

inv_mod(554^503,943);

Calculate