tags:

views:

49

answers:

2

How do you solve something like 7Xd =(congruent to) 1 mod 40?

find the smallest d that satisfies this equation

A: 

Modulo is only half an arithmetic operation. It requires div to be complete. As such, you will get a range of possible answers. If I'm reading your question right. 7Xd doesn't mean anything to me - perhaps more info could get a better answer?

Michael Dorgan
d is what we're trying to find... find the smallest d that satisfies this equation..
Ram Bhat
And what does X represent? Multiplication, something else? If it means multiply, then 7d = 1 mod 40 -> 7d = 1 -> d = 1/7.But I don't think that's what you mean.
Michael Dorgan
A: 

Euler's theorem suggests that if you raise 7 to a large enough power, you find D. Powers of seven mod 40 are 1, 7, 9, 23, 1, ..., so d is 23.

D is unique as 40 and 7 are coprime (as 7 is prime). If it weren't unique, there would be two d1, d2 such that d1 != d2 and d1*7 == 1 == d2*7 (mod 40), so some value (d2-d1)*7 mod 40 is zero. I'm not sure how a general case might be found.

Pete Kirkham