Prove that $n$ is prime given two conditions. $$\text{Suppose that $d$ is a divisor of $n$ and $d+1$ is a divisor of $n+1$. Prove that $n$ is prime.}$$

First Assume $p$ is prime then the only divisors $d=1,p$ so $d+1 =2,p+1$ which both divides $p+1$ if $p+1$ is even,which means that $p$ is odd prime. 
So it works for all odd primes $p\not=2$ that if $d|p$ then $d+1|p+1$.
On the other hand assume $n=a b$ not a prime then $1<a,b<n$, so there are at least the divisors $d=1,a,b,ab$ which means that $d+1=2,a+1,b+1,ab +1$ that must divide $n+1=ab+1$ sure the $2,ab+1$ divides $n+1$ if $n+1$ is even and $n$ is odd, we need to see if $a+1,b+1$ divides $ab+1$.
Which means that $ab+1=0  (\mod a+1)$ and $ab+1=0(\mod b+1)$, we can see that $ab+1 = (a+1)b+1-b =1-b (\mod a+1)$ and the same to the second modular equation $ab+1=1-a (\mod b+1)$, which means that $1-a=0 (\mod b+1)$ and $1-b=0 (\mod a+1)$ which means that $a=1 (\mod b+1)$ and $b=1 (\mod a+1)$, and since $a,b >1$ so $a=(b+1)c_1 +1$ and $b=(a+1)c_2 +1$ with $c_1,c_2 \geq 1$.
Now in the first equation substitute instead of $b$ the value $(a+1)c_2+1$, we arrive at $a=(b+1)c_1+1=((a+1)c_2+1)c_1+1$ when trying to solve it with the conditions that $a>1$ and $c_1,c_2 \geq 1$ you get contradictions,which conclude the proof.
if d|n and d+1|n+1 then n is a odd prime. 
