4. Find all prime numbers $p$ and $q$ such that $3 p^{q-1}+1$ divides $11^{p}+17^{p}$.

(Bulgarian)
4. Answer: $(p, q)=(3,3)$.

For $p=2$, it is directly verified that there are no solutions. Further, $p>2$.

Since $N=11^{p}+17^{p} \equiv 4(\bmod 8)$, it follows that $8 \nmid 3 p^{q-1}+1>4$. Consider some odd prime divisor $r$ of the number $3 p^{q-1}+1$. Clearly, $r \notin\{3,11,17\}$. If $b \in \mathbb{Z}$ is such that $17 b \equiv-1(\bmod r)$, then $r \mid b^{p} N \equiv a^{p}-1(\bmod r)$, where $a=11 b$. Thus, the order of the number $a$ modulo $r$ divides $p$, i.e., $\operatorname{ord}_{r}(a) \in\{1, p\}$. If $\operatorname{ord}_{r}(a)=1$, we have $r \mid a-1 \equiv(11+17) b(\bmod r)$, which gives the only possibility $r=7$. On the other hand, if $\operatorname{ord}_{r}(a)=p$, then $p \mid r-1$. Thus, the canonical factorization of the number $3 p^{q-1}+1$ has the form

$$
3 p^{q-1}+1=2^{\alpha} 7^{\beta} p_{1}^{\gamma_{1}} \cdots p_{k}^{\gamma_{k}}
$$

where $p_{i} \notin\{2,7\}$ are prime numbers such that $p_{i} \equiv 1(\bmod p)$.

We have seen that $\alpha \leqslant 2$. Also, if $p=7$, then $\beta=0$, and otherwise

$$
\frac{11^{p}+17^{p}}{28}=11^{p-1}-11^{p-2} 17+11^{p-3} 17^{2}-\cdots+17^{p-1} \equiv p \cdot 4^{p-1} \quad(\bmod 7)
$$

so $11^{p}+17^{p}$ is not divisible by $7^{2}$. In both cases, $\beta \leqslant 1$.

For $q=2$, (*) becomes $3 p+1=2^{\alpha} 7^{\beta} p_{1}^{\gamma_{1}} \cdots p_{k}^{\gamma_{k}}$, but since $p_{i} \geqslant 2 p+1$, this is possible only if $\gamma_{i}=0$ for all $i$, i.e., $3 p+1=2^{\alpha} 7^{\beta} \in\{2,4,14,28\}$. From this, we do not obtain any solutions.

The case $q>2$ remains, in which case we have $4 \mid 3 p^{q-1}+1$, i.e., $\alpha=2$. Now, the right-hand side in (*) is congruent to 4 or 28 modulo $p$, from which it follows that $p=3$. In this case, $3^{q}+1 \mid 6244$, which holds only for $q=3$. The pair $(p, q)=(3,3)$ is indeed a solution.

Note. If it is not required that the number $q$ be prime, the case $\alpha=1$ must also be examined. Then the right-hand side in (*) is congruent to 2 or $14(\bmod p)$, so $p=13$ is also considered, but in this case $4 \mid 3 p^{q-1}+1$, i.e., $\alpha=2$, so this case is impossible.