4. Let $\varphi(n)$ denote the number of natural numbers less than $n$ that are coprime to $n$.
(1) $p, q$ are two distinct prime numbers, prove that $\varphi(p q)=(p-1)(q-1)$.
(2) Using the result from (1), find the values of $p, q$ that satisfy $\varphi(p q)=3 p+q$.
4. (1) Since $p, q$ are two distinct prime numbers, the natural numbers less than $p q$ and coprime with $p q$ cannot be divisible by $p$ or $q$.
Among the $p q-1$ natural numbers from 1 to $p q-1$, there are $q-1$ numbers divisible by $p$ and $p-1$ numbers divisible by $q$. $\varphi(p q)=p q-1-(p-1)-(q-1)=(p-1)(q-1)$.
(2) From (1) we have
$$
\begin{array}{l}
(p-1)(q-1)=3 p+q, \\
p q-4 p-2 q+1=0, \\
(p-2)(q-4)=7 . \\
\left\{\begin{array} { l } 
{ p - 2 = 1 , } \\
{ q - 4 = 7 , }
\end{array} \quad \left\{\begin{array} { l } 
{ p - 2 = 7 , } \\
{ q - 4 = 1 , }
\end{array} \left\{\begin{array} { l } 
{ p - 2 = - 1 , } \\
{ q - 4 = - 7 , }
\end{array} \quad \left\{\begin{array}{l}
p-2=-7, \\
q-4=-1 .
\end{array}\right.\right.\right.\right.
\end{array}
$$

Solving gives $p=3, q=11$.