# GCD of two numbers

Let us call the largest common divisor of integers $m$ and $n$ by $(m,n)$. For example, $(2,3)=1$ and $(10,15)=5$. Let us assume that $n(n+1)(n+2)$ is a square where $n$ is an integer.

Now I want to find the value of $(n+1,n+2)$ and $(n+1,n(n+2))$ .

To solve this problem I think that the multiplication of two numbers is the multiplication of their LCM and GCD. But I can not proceed after that step.

Can you help me to solve this problem?

-
First prove that if $ab$ is a square, and $\gcd(a,b)=1$, then $a$ and $b$ are both squares. Then notice that $n(n+2)$ is so close to a square that it's almost impossible for it to be a square. Then mop up. –  Gerry Myerson Oct 2 '13 at 13:10
Is it possible for a prime to divide both $n+2$ and $n+1$? –  Callus Oct 2 '13 at 13:11
According to my opinion , the answer of your question is no . @Callus –  Way to infinity Oct 2 '13 at 13:20
Don't your assumptions imply n=-1? In which case (0, 1) = 1 and (0, -1) = -1? –  DanielV Oct 2 '13 at 13:33

First one: let's assume $d= (n+1,n+2)$, $d$ will divide any linear combination of $n+1$ and $n+2$ so, $d \ |\ n+2 - (n+1) \Rightarrow d|1 \Rightarrow d=1$ (last implication came from the fact $d$ is GCD .

Second:

let's assume $d=(n+1,n(n+2))$

We have $d\ |\ (n+1,n(n+2)) \Rightarrow d\ |\ n+1$ and $d\ |\ n(n+2)$ -----(1)

$d$ will divide any linear combination of $n+1$ and $n(n+2)$ so,

$d\ | n(n+2) -n(n+1) \Rightarrow d\ |\ n$ -----(2)

from (1) and (2): $d\ |\ n+1$ and $d\ |\ n$ (complete the solution to find $d$)

-