# Divisibility conditions

A first part of a question on a practice exam asks whether there exist $a,b \in \mathbb{Z}$ such that $ap + bn = 1$, where $p$ and $n$ are integers such that $p$ does not divide $n$, and $p$ is prime.

So $gcd(p,n) = 1$, and so we can write $p = nq_1 + r_1$ where $r \neq 0$, then $n = q_2r_1 + r_2$, and carrying out the euclidean algorithm the procecess terminates at remainder $1$ and we can write it out backward.

I am then asked whether there are solutions $h,k \in \mathbb{Q}[x]$ such that $hf + kg = 1$ where $f$ is irreducible and does not divide g. I think that the division algorithm for polynomials would extend a similar argument here.

I am then asked the same question but considering $\mathbb{Q}[x,y]$ instead of $\mathbb{Q}[x]$, and I'm not sure where to proceed. I only understand that the ideals of this are not principal, but I'm not sure how to say that the division algorithm wouldn't apply here.

• "Where $p$ and $n$ are integers such that $p$ does not divide $n$" That will depend heavily on the values of $p$ and $n$. $4$ does not divide evenly into $6$ for example, but $4a+6b$ is always even and cannot equal $1$ for any choice of integers $a,b$. You need a stronger condition... namely that $p$ and $n$ are coprime, i.e. $\gcd(p,n)=1$. – JMoravitz Apr 23 '18 at 17:50
• Perhaps you are missing the very important statement that not only must $p$ not divide into $n$ but also that $p$ must be prime... – JMoravitz Apr 23 '18 at 17:52
• I'm sorry, I left out a condition from the question which is very important which is that $p$ is prime – blanchey Apr 23 '18 at 17:52
• In the two variable case, if you take the pair of elements $x,y$ and let $A$ be the (smallest) ideal they generate, does $A$ contain any constants? – Will Jagy Apr 23 '18 at 17:59
• @WillJagy That is the counterexample I was looking for. Thank you. – Peter Apr 23 '18 at 18:00