1

I factored $3n^2+7n+4$ to $(3n+4)(n+1)$ and because there isn't a common factor of those and $n+2$ I said that the gcd is $1$, but is there any othere way to go about it that would come up with a gcd that isn't $1$?

MonkeyKing
  • 3,178
Zoe Hayes
  • 255
  • 1
    Try $n=0$ or any even number. The GCD is 2. – kennytm Apr 23 '15 at 16:03
  • I have a question. When people say gcd of polynomials, do they mean any constant number multiply of a monic polynomial or not? $2$ and $1$ are both just $C$. – MonkeyKing Apr 23 '15 at 16:09
  • @MonkeyKing The above is a gcd of integers, since $,n\in \Bbb Z.,$ Generally gcds are defined only up to unit factors. For integers we normalize by choosing a non-negative gcd, and for polynomials over a field we normalize the gcd to be monic (lead coeff $= 1).,$ – Bill Dubuque Apr 23 '15 at 21:12

3 Answers3

7

We have $$3n^2+7n+4 = (n+2)(3n+1) + 2$$ Hence, if $d$ is a common divisor of $3n^2+7n+4$ and $n+2$, then $d$ must divide $2$. Hence, $\gcd(3n^2+7n+4,n+2) = 1 \text{ or }2$. $3n^2+7n+4$ is always even. Further, $n+2$ has the same parity as $n$.

Hence, if $n$ is odd, $$\gcd(3n^2+7n+4,n+2) = 1$$ while if $n$ is even $$\gcd(3n^2+7n+4,n+2) = 2$$

Adhvaitha
  • 20,259
2

Note that $\,\underbrace{\gcd(f(n),n\!+\!2) = \gcd(f(-2),n\!+\!2)}\ $ by the Euclidean algorithm, since
$\ {\rm mod}\ n\!+\!2\!:\,\ f(\color{#c00}n)\equiv f(\color{#c00}{-2})\ $ by $\ \color{#c00}{n\equiv -2},\ $ by the $ $ Polynomial Congruence Rule,

where above $\ f(x)\ $ is any polynomial with integer coefficients. $ $

In the OP: $\, f(-2) = 2,\,$ so $\,\gcd(f(n),n\!+\!2)=\gcd(2,n\!+\!2)=\gcd(2,n)$

Bill Dubuque
  • 272,048
1

Apply Euclid's algorithm: $$3n^2 + 7n + 4 = (3n+1)(n+2) + 2$$ $$ \text{gcd }(3n^2 + 7n + 4) = \text{ gcd }(n+2,2) $$ So the answer is $1$ if $n$ is odd, but $2$ if $n$ is even.

Mark Fischler
  • 41,743