Processing math: 100%

First time here? Check out the FAQ!

Ask Your Question
1

discrete_log?!

asked 3 years ago

Dennis Yurichev gravatar image

So is it working at all?

In Mathematica:

In[88]:= MultiplicativeOrder[3, 401, 138]
Out[88]= 318

In SageMath 9.4:

discrete_log(138, 3, 401-1)
...
"ValueError: No discrete log of 138 found to base 3"

I tried 401 and operation="*"

What I want? I want 318, because, in Python:

pow(3,318,401)=138
Preview: (hide)

1 Answer

Sort by » oldest newest most voted
3

answered 3 years ago

rburing gravatar image

You asked for the discrete logarithm in the ring of integers Z. You meant the following:

sage: discrete_log(Mod(138,401), Mod(3,401), 401-1)
318
Preview: (hide)
link

Comments

Thanks for your reply!

Dennis Yurichev gravatar imageDennis Yurichev ( 3 years ago )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 3 years ago

Seen: 2,232 times

Last updated: Feb 22 '22