Homepage › Solution manuals › Ivan Niven › An Introduction to the Theory of Numbers › Exercise 2.2.7 ( Probability that $ax \equiv b \pmod{15}$ has at least one solution)
Exercise 2.2.7 ( Probability that $ax \equiv b \pmod{15}$ has at least one solution)
If is selected at random from , and is selected at random from , what is the probability that has at least one solution? Exactly one solution?
Answers
Proof.
- a)
-
By theorem 2.17, we know that the congruence
has at least one solution if and only if
.
For each fixed , the number of such that is .
Therefore, the number of ordered pairs such that has at least one solution is
Sage :
sum(15//gcd(a,15) for a in range(1,15))
The probability that has at least one solution is
- b)
-
The congruence
has exactly one solution if
.
Therefore, the number of such that has exactly one solution is , and the probability is