Post Reply 
Request for "Decimal Period of 1/X in Base Y" program
02-28-2015, 01:14 PM
Post: #10
RE: Request for "Multiplicative Order of Y (mod X)" program
(02-28-2015 09:39 AM)Gerald H Wrote:  Your programme is correct & Joe Horn's erroneous.

Try the order of 777 modulo 3600, then raise 777 to that power mod 3600 - is the answer one?

You just have too much respect for that no-good Joe Horn & too little confidence in yourself.

Mathematica's MultiplicativeOrder(777,3600) does not return an answer, because 777 and 3600 are not coprime. But MultiplicativeOrder(777/3,3600) returns 60... same as my program. I'm just guessing, but perhaps this means that the GCD should be removed from the first input rather than the second, like this:

Code:
<<
SWAP WHILE DUP PICK3 GCD DUP 1 >
REPEAT /
END DROP SWAP DUP MODSTO EULER DIVIS DUP2 POWMOD 1 POS GET NIP
>>

<0|ΙΈ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Request for "Multiplicative Order of Y (mod X)" program - Joe Horn - 02-28-2015 01:14 PM



User(s) browsing this thread: 2 Guest(s)