Integer Polynomials taken with different modulii Consider the polynomials of the form $P(x)=p_nx^n+p_{n-1}x^{n-1}+...+p_1x+p_0$ with all the $p_i\in\mathbb{Z}.$ Now consider integer polynomials $(f(x),g(x))$ such that $f(x)(ax+b)+cg(x)=1.$ 
For what relationship of the values $a,b,c$ do there exist $f(x),g(x)$ such that $f(x)(ax+b)+cg(x)=1$? 
For example, there do not exist $f(x),g(x)$ such that $f(x)(2x+5)+3g(x)=1,$ but there do exist $f(x),g(x)$ such that $(2x+5)f(x)+4g(x)=1.$ 
 A: Conclusion: Such $f$ and $g$ exist if and only if $\gcd(b,c)=1$ and every prime that divides $c$ also divides $a$.
Proof. Let $a,b,c\in\Bbb{Z}$ and $f,g\in\Bbb{Z}[x]$ be such that
$$(ax+b)f+cg=1.\tag{1}$$
First consider a few degenerate cases:


*

*If $a=0$ then there exists a solution if and only if $b$ and $c$ are coprime.

*If $c=0$ then necessarily $a=0$ and $b=\pm1$. 

*If $c=\pm1$ then any choice of $a$ and $b$ yields a solution by taking $f=0$ and $g=c$. 


So now suppose $a\neq0$ and $|c|>1$. Plugging in $x=0$ shows that $\gcd(b,c)=1$. Let $p$ be a prime number such that $p\mid c$. Then reducing equation $(1)$ modulo $p$ shows that $p\mid a$ because
$$(ax+b)f\equiv1\pmod{p}.$$
Conversely, if $a$, $b$ and $c$ are integers with $a\neq0$ and $|c|>1$ and $\gcd(b,c)=1$, and such that every prime $p$ dividing $c$ also divides $a$, then for a sufficiently large integer $m$ we have $a^m\equiv0\pmod{c}$. It follows that the polynomials
$$(ax+b)^k\in(\Bbb{Z}/c\Bbb{Z})[x],$$
are all of degree less than $m$. Then there is a nontrivial $\Bbb{Z}/c\Bbb{Z}$-linear combination of $(ax+b)^0,\ldots,(ax+b)^m$ that equals $0$, or in other words, there are integers $c_0,\ldots,c_m\in\Bbb{Z}$, not all divisible by $c$, such that
$$\sum_{k=0}^mc_k(ax+b)^k\equiv0\qquad\text{ in }\quad(\Bbb{Z}/c\Bbb{Z})[x].$$
Without loss of generality $c_0\not\equiv0\pmod{c}$ because $b$ is coprime to $c$, and it follows that $c_0$ is coprime to $c$ because every prime that divides $c$ also divides $a$. Then $c_0^n\equiv1\pmod{c}$ for some positive integer $n$, and hence
$$1\equiv c_0^n\equiv\left(\sum_{k=1}^mc_k(ax+b)^k\right)^n=(ax+b)^n\left(\sum_{k=1}^mc_k(ax+b)^{k-1}\right)^n.$$
This shows that there exists some $g\in\Bbb{Z}[x]$ such that
$$(ax+b)f+cg=1,$$
where
$$f=(ax+b)^{n-1}\left(\sum_{k=1}^mc_k(ax+b)^{k-1}\right)^n.$$
