-2

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.

2 Answers2

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
  • What do you mean by ≡ and Zb ? – Shubham Avasthi Jun 12 '15 at 08:22
  • 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.