TITLE: Proving $2p +1 \mid 2^p + 1$
QUESTION [8 upvotes]: The following theorem is well known and already proven by Lagrange 1775:

Let $p \equiv 3 \pmod{4}$ be prime. $2p+1$ is also prime if and only if $2p+1 \mid 2^p - 1$. 

But how can we prove this:
Let $p \equiv 1 \pmod{4}$ be prime. $2p+1$ is also prime if and only if $2p+1 \mid 2^p + 1$.
Thanks.
EDIT: Thank you to Batominovski, for his great work and sharing the proof with us.

REPLY [6 votes]: Let $p$ be a positive prime such that $p\equiv 1\pmod{4}$.  If $2p+1$ is prime, then $$\left(\frac{2}{2p+1}\right)=(-1)^{\frac{(2p+1)^2-1}{8}}=(-1)^{\frac{p(p+1)}{2}}=-1\,.$$  Hence, $2^p\equiv -1\,\big(\text{mod }(2p+1)\big)$.  Therefore, $2p+1$ divides $2^p+1$.  Conversely, suppose now that $2p+1$ divides $2^p+1$.  Let $q$ be the largest prime factor of $2p+1$.  Then, $2^{2p}\equiv (-1)^2 =1\pmod{q}$.  On the other hand, $2^{q-1}\equiv 1\pmod{q}$.  Hence, $2^d\equiv 1\pmod{q}$, where $d:=\gcd(q-1,2p)$.  Clearly, $d=2$ or $d=2p$.  If $d=2$, then $q=3$, whence $2p+1=3^r$ for some $r\in\mathbb{N}$.  However, it can be easily seen that $9\nmid 2^p+1$, whence $r=1$.  However, this would mean $p=1$, a contradiction.  Therefore, $d=2p$. That is, $q=2p+1$, which means that $2p+1$ is prime.  
P.S. This proof can be used to deal with the case where $p\equiv 3\pmod{4}$, with a slight modification (and it is actually simpler).