Prime satisfying a given condition Let $p$ be a prime. If $$\frac {p-1}{4} $$ and $$\frac {p+1}{2} $$ are also primes then prove that $p=13$.
 A: The cases $p=2,3$ can be trivially checked. I'll assume $p\ge 5$.
Note $\left( \displaystyle\frac{p-1}{4} \right) \left( \displaystyle\frac{p+1}{2}\right)=\displaystyle\frac{p^2-1}{8}=a$ (say). Then $a$ has only two prime divisors.
Now it is well known that $24|p^2-1$ for $p>3$. Let $p^2-1=24t$. Then $a=3t$.
Thus $3$ is a prime divisor of $a$, implying $3$ equals one of $\displaystyle\frac{p-1}{4},\frac{p+1}{2}$. Direct substitution shows that $p=13$ is the only solution.
A: nice one.
For $\frac{p-1}{4}$ to be odd, $p$ must be of the form $8k+5$, so $\frac{p-1}{4}$ is of the form $2k+1$ and $\frac{p+1}{2}$ of the form $4k+3$.
If $k = 0,1,2 (\mod 3)$ then the three numbers are respectively congruent to
$k=0(\mod 3): 2,1,0 (\mod 3)$
$k=1(\mod 3): 1,0,1 (\mod 3)$
$k=2(\mod 3): 0,2,2 (\mod 3)$ 
This means that the only way all three of them are prime numbers is that one of them is $3$. 
For $k=0$ we have $5,1,3$ which is ruled out; for $k=1$ we have $13,3,7$ which satisfies hypotheses; for $k>1$ all numbers are $> 3$.
The only other case to be checked is $\frac{p-1}{4} = 2$; in this case however $p = 9$, so this could not be a solution.
A: The primes have product $(p^3 - p)/8$ which is divisible by $3$. So one prime = $3$. 
The rest is trivial.
