Consider $n = 2,3,4,5$ for which we have the corresponding $N=3,8,15,24$.

In fact, so are the numbers up to 15: Their GCD is 1.

How can I prove that these expressions are always relatively prime to each other (or not)?


closed as unclear what you're asking by Xander Henderson, YiFan, Shailesh, Leucippus, Jyrki Lahtonen Mar 3 at 5:21

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 4
    $\begingroup$ Do you mean to ask if $n$ and $n^2-1$ are always coprime? $\endgroup$ – Eevee Trainer Feb 21 at 4:21
  • 7
    $\begingroup$ $n\cdot n - (n^2-1) = 1\ $ $\endgroup$ – Bill Dubuque Feb 21 at 4:24
  • 2
    $\begingroup$ How can they not be relatively prime? If a prime $p$ divides $n$ then it can not divide $n^2 - 1$. $\endgroup$ – fleablood Feb 22 at 7:39

Hint $:$

$a,b \in \Bbb Z$ with $ax+by = 1$ for some integers $x,y \in \Bbb Z \implies \text {gcd}\ (a,b)=1.$

Proof $:$

Let $\text {gcd} (a,b) = d$ then $d \mid a,d \mid b$ $\implies d \mid ax+by = 1$ $\implies d=1.$

Now use the hint given by Bill Dubuque in his comment above to complete the proof.


You have $gcd(n,n-1) = 1$ and $gcd(n,n+1)=1$.

So, it follows $gcd(n,(n+1)(n-1)) = gcd(n,n^2-1)= 1$.


If a prime number $p$ divides $n$ then $p$ divides $n^2$ and $p$ does not divide $n^2 - 1$.

So $n$ and $n^2 - 1$ can't have any prime divisors in common.


Not the answer you're looking for? Browse other questions tagged or ask your own question.