These are two problems which I have been trying to solve.
The arithmetic mean of twin primes 5 and 7 is 6 which is a triangular number. Do there exist any other such twin primes? If they exist find a pair otherwise prove that there do not exist any other such twin primes.
Let the smaller prime be $p$. The larger one is $p+2$. Their mean is $p+1$. Triangular numbers are of the form $\frac{n(n+1)}{2}$. So,
$$\frac{p+p+2}{2} = \frac{n(n+1)}{2}$$
How do I proceed further?
The arithmetic mean of twin primes 3 and 5 is 4 which is a perfect square. Do there exist any other such twin primes? If they exist find a pair otherwise prove that there do not exist any other such twin primes.
I have made no progress in this one.
Thanks.
On the first one:
$$p+1 = \frac{n(n+1)}{2}$$ $$p = \frac{n(n+1)}{2} - 1$$ $$p = \frac{(n^2 + n - 2)}{2}$$ $$p = \frac{(n-1)(n+2)}{2}$$
Since $p$ is prime, $(n-1)/2 = 1$, so $n=3$ and $p+1 = n(n-1)/2 = 3*4/2 = 6$; or $n-1 = 1$ so $p+1 = 3$ (which, when we go back and check, is not a solution as $p+2 = 4$ and we're looking at twin primes). This proves $p+1 = 6$ is the only average of twin primes that is a triangular number.
On the second one:
$$p+1 = n^2$$ $$p = n^2 - 1$$ $$p = (n-1)(n+1)$$
Since $p$ is prime, $n-1 = 1$. This yields $p+1 = n^2 = 2^2 = 4$. This proves $p+1 = 4$ is the only average of twin primes that is a perfect square.