Post Reply 
Request for "Decimal Period of 1/X in Base Y" program
02-28-2015, 01:56 PM
Post: #11
RE: Request for "Multiplicative Order of Y (mod X)" program
(02-28-2015 01:14 PM)Joe Horn Wrote:  
(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
>>

No, the meaning is that if GCD of the two numbers is greater than one then NO power of that number is equal to one modulo the 2nd number.
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 - Gerald H - 02-28-2015 01:56 PM



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