Let $a,b,c$ positive integers with $b|c$ I am looking for triplets that satisfy $c \equiv a \pmod{ab+1}$.

What I found by now is that given a solution, we can write $c=q(ab+1)+a=a(qb+1)+q$ So we get $c \equiv q \pmod{qb+1}$ where q is the whole part of $\frac{c}{ab+1}$.

Another thing I observed is that both $a$ and $c$ are coprime to $ab+1$. This means they are both elements of the multiplicative group modulo $ab+1$. It seems like something can be done to get more information, but I am stuck.


  • $\begingroup$ You'll find that simple "Here's the statement of my question, solve it for me" posts will be poorly received. What is better is for you to add context (with an edit): What you understand about the problem, what you've tried so far, etc.; something both to show you are part of the learning experience and to help us guide you to the appropriate help. You can consult this link for further guidance. $\endgroup$
    – Shaun
    Dec 26 '18 at 16:49
  • 1
    $\begingroup$ @Shaun I have edited my question, I get what you are saying. Thanks for the advice, I hope this is ok now. $\endgroup$
    – oren1
    Dec 26 '18 at 17:00
  • $\begingroup$ You're welcome (+1). Yeah, it's okay now. $\endgroup$
    – Shaun
    Dec 26 '18 at 17:04
  • $\begingroup$ Help me understand, for given $b,c$ ; are you trying to find all possible values of $a$ ? $\endgroup$
    – Haran
    Dec 26 '18 at 17:14
  • $\begingroup$ You are trying to find all solution for $a$ in the function of $a$ and $b$???? $\endgroup$
    – Aqua
    Dec 26 '18 at 17:15

First, we have $b \mid c$, which means that we can replace $c = bk$. Now, we have $a \equiv bk \pmod{ab+1}$. As you noted, we can see that $\gcd(b,ab+1)=1$. Thus, we can instead write $k \equiv \frac{a}{b} \pmod{ab+1}$.

We can also note that- $$ab \equiv -1 \pmod{ab+1} \implies \frac{1}{b} \equiv -a \pmod{ab+1} \implies k \equiv \frac{a}{b} \equiv -a^2 \pmod{ab+1}$$ Thus, $k = (ab+1)q - a^2$ . Substituting this back, we get our solutions: $$\{a,b,c\} = \{a \space ,\space b \space, \space b ((ab+1)q-a^2)\}$$ where $q$ is any integer.

If you want $a$ instead in terms of $b,c$ , we can see that $c = -a^2+b^2a+bq$ $$a^2-(b^2)a+(c-bq)=0$$ This provides us a quadratic equation. $$a = \frac{b^2 \pm \sqrt{b^4+4bq-4c}}{2}$$ where $q$ is a suitable integer such that $b^4+4bq-4c=x^2$

  • $\begingroup$ Does this answer your question? I have provided the general solution. $\endgroup$
    – Haran
    Dec 26 '18 at 17:34
  • $\begingroup$ Yes indeed. thanks! $\endgroup$
    – oren1
    Dec 26 '18 at 17:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.