Find all $p, q$ (coprime) such that $\frac{(p-1)(q-1)}{2}$ is a prime number.
I found that $(p,q) = (2,7),(7,2),(2,15),(3,8)$ gave prime numbers for $\frac{(p-1)(q-1)}{2}$, but how do we find all?
Find all $p, q$ (coprime) such that $\frac{(p-1)(q-1)}{2}$ is a prime number.
I found that $(p,q) = (2,7),(7,2),(2,15),(3,8)$ gave prime numbers for $\frac{(p-1)(q-1)}{2}$, but how do we find all?
Suppose $p,q \ge 3$. Notice that one of $p-1$ or $q-1$ must be even (for$\frac{(p-1)(q-1)}{2}$ to be an integer) hence one of $p$ or $q$ must be odd. If $p$ is odd then $\frac{(p-1)}{2} \cdot (q-1)$ is not prime unless $\frac{p-1}{2}$ is $1$, i.e $p=3$. This allows us to deduce that if $(p,q)$ is a solution, with $p,q \ge 3$, then it is of the form $(3,n+1)$ (or $(n+1,3)$) for some $n$ prime.
If one of $p,q$ is less than $3$, then (since neither can be $1$) one of $p,q$ must be equal to $2$. If this is the case, then the solution $(p,q)$ is of the form $(2,2n+1)$ (or $(2n+1,2)$) for $n$ prime.
Edit: For the case $p,q\le 0$, then we can write $$\frac{(p-1)(q-1)}{2}=\frac{((2-p)-1)((2-q)-1)}{2}.$$
You can then use the answer to the positive case to get your result.
Hope this helps.
Starting with the potential that the result is $2$, we need $(p-1)(q-1)=4$, giving $3$ initial options: $(p,q)= \{(2,5),(3,3),(5,2)\}$. However $p=q=3$ violates the requirement for coprime $p,q$, so only the $2$ optinos to get the resulting prime $2$.
Otherwise the result is an odd prime $r>2$ and we need $(p-1)(q-1)=2r$. Then we can have $(p,q) = \{(2,2r+1),(3,r+1), (r+1,3),(2r+1,2)\}$. The first and last of these will be valid for all $r$, but the middle two options require that $3 \nmid r+1$. So primes $r \equiv 2 \bmod 3 $ have $2$ options, and all other primes have $4$ options.
If $p, q$ are coprime then at most one is even. Wolog $q$ is odd and $q-1$ is even.
So $(p-1)\frac{q-1}2$ is prime. So either $p-1 = \pm 1$ or $\frac {q-1}2 = \pm 1$.
Case 1: $p-1 = -1$
If $p-1 = -1$ then $p = 0$ and $0$ is not coprime to anything except $\pm 1$. (Everything divides 0) so $q = \pm 1$. $\frac {1-1}2 = 0$ is not prime so $q = -1$ and $\frac {q-1}2 = -1$ and ... $ (p-1)\frac{q-1}2=1$ is not prime.
Case 2: $p-1 = 1$
So $p = 2$ and $\frac {q-1}2 $ is prime. So $q = 2k + 1$ for any prime. i.e. Let $k$ be prime, the $\gcd(2, 2k+1) =1$ and $\frac{(2-1)(2k+1 -1)}2 = k$ is prime.
Case 3: $\frac {q-1}2 = -1$
$q = -1$ and $p= k + 1$ for any prime. i.e. $\gcd(k+1,-1)=1$ and $\frac{(k+1-1)(-1 -1)}2 = -k$ is prime.
Case 4: $\frac{q-1}2=1$
$q = 3$ and $p = k +1$ for any prime $k=3$ or $k \equiv 1 \mod 3$
So options are $(2,2k+1)$ for any prime $k$.
$(-1, k+1)$ for any prime.
$(3,4)$ and $(3,k+1)$ for any prime of the form $k \equiv 1 \mod 3$.