| 1 | initial version |
You asked for the discrete logarithm in the ring of integers $\mathbb{Z}$. You meant the following:
sage: discrete_log(Mod(138,401), Mod(3,401), 401-1)
318
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.