3. Find all prime pairs $(p, q)$ such that $\frac{\left(2 p^{2}-1\right)^{q}+1}{p+q}$ and $\frac{\left(2 q^{2}-1\right)^{p}+1}{p+q}$ are both integers.
Three, Analysis: If $p, q$ has one equal to 2, let's assume $p=2$, then we have $\left\{\begin{array}{c}2+q \mid 7^{q}+1 \\ 2+q \mid\left(2 q^{2}-1\right)^{2}+1\end{array}\right.$ Furthermore, $\left(2 q^{2}-1\right)^{2}+1 \equiv\left(2 \cdot(-2)^{2}-1\right)^{2}+1 \equiv 50(\bmod q+2)$, which means $q+2 \mid 50$, so $q=3$ or $q=23$. Also, $2+q \mid 7^{q}+1$, when $q=3$, it is clear that $5 \mid 344$ does not hold, and when $q=23$, $7^{23}+1 \equiv 49^{11} \cdot 7+1 \equiv(-1)^{11} \cdot 7+1 \equiv-6(\bmod 25)$, which also does not hold. Therefore, $p, q$ must both be odd primes. When $p=q$, then $2 p \mid(2 p-1)^{p}+1$ clearly holds. Now consider the case $p \neq q$. Without loss of generality, assume $p<q$. According to the conditions, $\left(2 p^{2}-1\right)^{q} \equiv-1(\bmod p+q)$, which means $\left(2 p^{2}-1\right)^{2 q} \equiv 1(\bmod p+q)$. Let the order of $2 p^{2}-1$ modulo $p+q$ be $\tau$, and it is easy to see that $\tau$ is even, so $\tau \mid 2 q$. Also, $\tau \mid \varphi(p+q)$, which means $\tau \leq \varphi(p+q) \leq \frac{p+q}{2}<q$, so $\tau=2$. Therefore, $2 p^{2}-1 \equiv-1(\bmod p+q)$, which means $p+q \mid 2 p^{2}$. Since $p \neq q$, we have $(p+q, p)=1$, so $p+q \mid 2$, which is a contradiction. Hence, it can only be that $p=q$, and the required prime pairs are $(p, p)$.