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.
2026-04-12 12:37:18.1775997438
On
When will $ax+1$ be divisible by $b$?
170 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2
There are 2 best solutions below
8
On
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$.
I found the answer using Fermat's Little Theorem. The answer should be $x=b*n-a^{b-2}$ where $n$ is an integer.