2

I was requested to show $2n+1$ and $n(n+1)$ are coprimes. I struggled a bit to find the correct way to show this, and I wanted to know if my proof is correct. Here's what I did.


Firstly, I will use the following lemma, whose demonstration I will skip for the sake of brevity:

$\text{Lemma}:$ Let $p$ be some prime number. Then $p|ab \implies (p|a \space \lor \space p|b)$.

$\text{My solution}:$ Assume $p$ is a prime number, $p|(2n+1)$ and $p|n(n+1)$. From $p|n(n+1)$ it follows, according to the lemma, that $p|n$ or $p|(n+1)$.

  • If $p|n$ then $p|2n$ and $p\nmid(2n+1)$.

  • If $p|(n+1)$ then $p|(2n+2)$ and $p\nmid(2n+1)$.

Hence, it is impossible for $p$ to divide $n(n+1)$ and $2n+1$. Then $2n+1$ and $n(n+1)$ share no prime in their prime factorizations, meaning they are coprime.


Is this correct? Thanks in advance.

lafinur
  • 3,322
  • Yes, your proof is fine. – geetha290krm Nov 12 '22 at 23:20
  • Yes, your proof is correct and probably the most direct and elementary way to go at it. A funny way to prove this would be to come from the other side: If $p|2n+1$ then $2n=-1\mod p$, so $n=(p-1)/2$ mod $p$ (also $p\neq 2$). Then $n(n-1) = (p-1)(p+1)/4 = -1/4 \neq 0$ mod $p$ (note that $4$ is invertible mod $p$). This prove is of course much less elementary, but the method can prove to be valuable occasionally. E.g. you can thus easily test if $2n+1$ and some arbitrary polynomial in $n$ for common factors. – Lazy Nov 12 '22 at 23:41
  • E.g.: Take $p(n)$ not as $n(n+1)$ but for example as $n^3+3n^2+5$. Then we just need to look at $(p-1)^3/2^3+3(p-1)^2/2^2+5 = -1/2^3 + 3/2^2 + 5 = -1/2^3 + 6/2^3 + 40/2^3 = 45/2^3$ mod $p$. This can only be $0$ mod $p$ if $41=0$ mod $p$ (as $2$ is invertible). Thus this in only the case if $p=3$ or $p=5$. So $2n+1$ and $n^3+3n^2+5$ are coprime unless $n = (3-1)/2+3k =1+3k$ or $n = (5-1)/2+5k = 2+5k$, with the only prime dividing both numbers $3$ or $5$ or both if $n$ fits both representations ($1+3k=2+5l$ iff. $k = (1+5l)/3$ only possible if $2l=5l=-1=2$ mod $3$ so $l=1$ mod $3$). – Lazy Nov 12 '22 at 23:53
  • Note that in this case for this to work we only need $2$ invertible mod $p$, so it can also be done for composites. Thus you also get all cases divisible by $9$, $15$, $25$, etc. this way. – Lazy Nov 12 '22 at 23:56
  • @Lazy that is one involved proof that seems like just too much work. You are NOT living up to your handle there! – Mike Nov 13 '22 at 00:08
  • 1
    Since $2n+1$ leaves remainder $\pm 1$ when divided by $n$ and $n+1$ it is coprime to both $n$ and $n+1$ so it is coprime to their product by the linked dupe. Solution verification questions are off-topic without specifying precisely where in the proof you have a doubt, and why. This site is not meant to be an open-ended proof checking machine. – Bill Dubuque Nov 13 '22 at 05:20
  • One can also notice $(2n+1)^2-4n(n+1)=1$, so any common divisor must divide $1$ ... – Sil Nov 13 '22 at 22:55

1 Answers1

2

Your proof is correct, there is nothing to add except perhaps to notice that by hypothesis, $p > 1$, which is the true reason why a prime cannot divide a number and its successor ($p|2n$ and $p|(2n +1)$ cannot hold simultaneously).

user12030145
  • 1,093
  • Please strive not to post more (dupe) answers to dupes of FAQs, cf. recent site policy announcement here. – Bill Dubuque Nov 13 '22 at 06:00
  • This did not strike me as a dupe for a beginner in arithmetics at least. The phrasing is quite distinct. – user12030145 Nov 13 '22 at 12:32
  • In all modesty, didn't strike it as dupe to me either. Specially since the referenced post was for a general solution of a problem, while mine was a verification request. – lafinur Nov 14 '22 at 20:24