So I had a more complicated problem and managed to reduce it to something of the the form: $c|({ax+b})$ where $x$ is an integer. I need to express $x$ as a function of some parameter $k$.

$a, b$ and $c$ are constants. I have to find all integer solutions for $x$ and express them as some function with one parameter. So I should get a function $x(k)$.

  • 1
    $\begingroup$ Given a, b, and c find x? Does there always have to be some x ? $\endgroup$ Jan 3, 2017 at 3:28
  • $\begingroup$ What progress have you made so far? $\endgroup$ Jan 3, 2017 at 3:31
  • $\begingroup$ What is $k$? Are $c$, $a$, and $b$ given? $\endgroup$ Jan 3, 2017 at 3:32
  • 2
    $\begingroup$ @indjev99 Can you provide the original question $\endgroup$ Jan 3, 2017 at 3:37
  • $\begingroup$ Are $a,b,c$ related, in particular is $\gcd(a,c)=1\,$? $\endgroup$
    – dxiv
    Jan 3, 2017 at 3:40

1 Answer 1


$c|ax+b $ has integer solutions if $\gcd (a,c)=1$ or $b $ is a multiple of $\gcd (a,c) $. Otherwise there is no solution.

If $\gcd (a,c)=1$ then we can solve $na+mc=1$.

Then $x=-nb+kc $ is an integer solution.

As $ax+b= -anb-akc+b=(mc- 1)b+akc+b=c (mb+ak) $

If $\gcd (a,c) \ne 1$ but $b $ is a multiple of $\gcd (a,c) $ then solve for $c/\gcd (a,c) $ divides $(ax+b)/\gcd (a,c) $


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .