Consider two natural numbers $a$ and $b$ such that $b$ is prime and $a$ is indivisible by $b$. Then, for which integral values of $x$ should $ax+1$ be divisible by $b$ ? I tried different values of $a$ and $b$ and found the values of $x$ satisfing the above condition in each case, but saw no pattern. Please give me the answer of this question with proper explanation if possible because I am trying to prove something and this is a crucial part of that proof.
Asked
Active
Viewed 167 times
-2
-
I believe you want to try Bezout's lemma. – MathNewbie Jun 12 '15 at 08:05
-
May be, but I don't know Bezout's lemma clearly. – Shubham Avasthi Jun 12 '15 at 08:08
-
1Basically it says that for nonzero integers $a,b$, if $\gcd(a,b) = d$, then there exists integers $x_1,x_2$ so that $ax_1+bx_2 = d$. In the case you have that $\gcd(a,b) = 1$. You should see the result. – MathNewbie Jun 12 '15 at 08:10
-
Good explanation of Bezout's Lemma but please explain me what do you mean by "You should see the result." ? – Shubham Avasthi Jun 12 '15 at 08:19
-
Suppose $\gcd(a,b) = 1$. by Bezout's lemma, there exists $x_1,x_2$ (integers) so that $ax_1+bx_2 = 1$. This is equivalent to $bx_2 = 1 - ax_1$. Equivalently, $bx_2 = a(-x_1)+1$. By definition of divisibility, $b$ divides $a(-x_1)+1$. – MathNewbie Jun 12 '15 at 08:38
-
Thanks, but how should I find the values of $x_1$ and $x_2$ ? – Shubham Avasthi Jun 12 '15 at 08:42
-
Using the euclidean algorithm. You can check the wiki for that information. It should do a great job in explaining it. – MathNewbie Jun 12 '15 at 08:44
-
@ShubhamAvasthi are you given that $gcd(a,b) = 1$ ?? – alkabary Jun 12 '15 at 08:50
-
Yes, Mr. alkabary, $gcd(a,b)=1$. – Shubham Avasthi Jun 12 '15 at 09:49
2 Answers
1
We wish to solve $ax\equiv -1 \pmod b$ for $x$ with $a$ and $b$ given and coprime, and $b$ prime. This is simply the negative of the multiplicative inverse of $a$ in $\mathbb Z_b$, which can be computed by a variety of methods for any given $a$ and $b$, since $a$ and $b$ are coprime. Once this value, let us say $-a^{-1}$, is found, the integral solutions for $x$ are $x\equiv -a^{-1} \pmod b$, or $x=-a^{-1}+bn$ for any integer $n$.

Avi
- 1,780
- 11
- 21
-
-
How can $-a^{-1} + bn$ be a natural number when a is not equal to 1 ? – Shubham Avasthi Jun 12 '15 at 08:27
-
@ShubhamAvasthi, if you haven't learned congruences, don't worry about the answer. It's just another way to realize the answer. – MathNewbie Jun 12 '15 at 08:40
-
Yes, I don't know congruences.Maybe that is why I am not able to understand this answer. Can you please elaborate ? – Shubham Avasthi Jun 12 '15 at 08:45
-
1
-
$x \equiv y \pmod p$ means that $x$ and $y$ are congruent modulo $p$; that is, when divided by $p$ the remainder is the same. $\mathbb Z_b$ in practice means, here, the integers from $0$ to $b$ (more properly it is a complete residue system modulo $b$). – Avi Jun 12 '15 at 12:08
-
How can $−a^{-1}+bn$ be a natural number when a is not equal to 1 ? – Shubham Avasthi Jun 12 '15 at 16:06
-
1@ShubhamAvasthi $a^{-1}$ does not denote the "normal" multiplicative inverse of $a$, that is $\frac 1a$, but the multiplicative inverse of $a$ in $\mathbb Z_b$, that is, the number by which we must multiply $a$ in order to obtain something which is congruent to $1$ modulo $b$. For instance, modulo $5$ the multiplicative inverse of $3$ is $2$, since $2\cdot 3\equiv 1 \pmod 5$. – Avi Jun 13 '15 at 17:42
0
I found the answer using Fermat's Little Theorem. The answer should be $x=b*n-a^{b-2}$ where $n$ is an integer.

Shubham Avasthi
- 335