8

I need to find all $n\in\mathbb{Z}$ so that $3n-4$ and $n^2+1$ would be coprime numbers.

I was thinking about using Euclidean algorithm - if two numbers $a$ and $b$ are coprime, then exist integers $c$ and $d$: $ac+bd=1$. So if there do not exist integers $c$ and $d$, then my numbers won’t be coprime.

Another idea is checking some $n$, what I saw is that when $n=3$ or $-2$, the common factor is $5$. Maybe it is always related to number $5$?

And the last thing, always one number is even and another is odd. So their common factor is either $1$, or bigger than $2$.

Any better ideas? :)

2 Answers2

6

Yes, the Euclidean algorithm is a good starting point. In particular recall these properties of the $\gcd$.

Hint. Since $3n-4$ is not divisible by $3$, we may consider $$\begin{align}\gcd(3n-4, n^2+1)&=\gcd(3n-4, 3n^2+3)\\&=\gcd(3n-4, (3n-4)(n+1)+n+7)\\&=\gcd(3n-4,n+7)\end{align}$$ Can you take it from here?

P.S. At end you will see that your remark about the common divisor $5$ is "almost" correct: the $\gcd$ can be $1$, $5$ or $25$.

Robert Z
  • 147,345
1

The extended Euclidean algorithm performed in $\mathbb Q[n]$ gives $$ 25 = -(3n+4)(3n-4)+9(n^2+1) $$ Therefore, $\gcd(3n-4, n^2+1)$ divides $25$.

lhf
  • 221,500