### The Maxima on-line user's manual

Algebra 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>.

```          (%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) ```

### Related Examples

##### inv_mod-mod

inv_mod(40,2854274299...

Calculate

inv_mod(15,17);

Calculate

inv_mod(5,1452);

inv_mod(33,7);

inv_mod(21,11);

Calculate

##### inv_mod-mod

inv_mod(2^120,143);

Calculate

numer:true;

inv_mod(21,11);

Calculate

##### inv_mod-mod-phi-print

/* First find the pri...

n : 4189;

P: 18909736861978...

Calculate

inv_mod(187,5);

Calculate

##### inv_mod-mod

inv_mod(173,786*522);

Calculate

##### inv_mod-mod

mod(437^4451,6961);

inv_mod(4451,6960);

mod((5584-((6104)*(35...

Calculate

inv_mod(291,7);

Calculate