Task 1. Find all prime numbers $p$ for which the natural number

$$
3^{p}+4^{p}+5^{p}+9^{p}-98
$$

has at most 6 positive divisors.

Note. You may use that 9049 is a prime number.
Solution. Answer: the only prime numbers for which this holds are 2, 3, and 5.

We write \( f(p) = 3^p + 4^p + 5^p + 9^p - 98 \). Then we calculate the prime factorizations \( f(2) = 3 \cdot 11 \), \( f(3) = 7 \cdot 11^2 \), and \( f(5) = 7 \cdot 9049 \). These have 4, 6, and 4 divisors, respectively. The number of divisors of \( p_1^{e_1} p_2^{e_2} \cdots p_n^{e_n} \) is \( (e_1 + 1)(e_2 + 1) \cdots (e_n + 1) \).

Now suppose \( p > 5 \). Modulo 6, we then have only two possibilities for \( p \), namely \( p \equiv 1, -1 \pmod{6} \), otherwise \( p \) would have a factor of 2 or 3. Fermat's Little Theorem tells us that \( a^6 \equiv 1 \pmod{7} \) (as long as \( a \not\equiv 0 \pmod{7} \)), so these two possibilities result in

\[
\begin{array}{r}
f(p) \equiv 3^1 + 4^1 + 5^1 + 9^1 - 98 \equiv 3 + 4 + 5 + 9 + 0 \equiv 0 \quad \pmod{7} \quad \text{if } p \equiv 1 \quad \pmod{6} \\
f(p) \equiv 3^{-1} + 4^{-1} + 5^{-1} + 9^{-1} - 98 \equiv 5 + 2 + 3 + 4 + 0 \equiv 0 \quad \pmod{7} \quad \text{if } p \equiv -1 \quad \pmod{6}
\end{array}
\]

The multiplicative inverses in the second line can be easily verified by multiplying them with the numbers in the row above. We conclude that \( 7 \mid f(p) \) for all \( p > 5 \). Alternatively, modulo 7, \( f(p) \equiv 3^p + (-3)^p + 5^p + (-5)^p - 0 \equiv 0 \) for odd \( p \).

Modulo 10, we have four possibilities for \( p \), namely \( p \equiv 1, 3, -3, -1 \pmod{10} \), otherwise \( p \) would have a factor of 2 or 5. Since \( a^{10} \equiv 1 \pmod{11} \) (as long as \( a \not\equiv 0 \pmod{11} \)), these four possibilities result in

\[
\begin{array}{rrrr}
3^1 + 4^1 + 5^1 + 9^1 - 98 \equiv 3 + 4 + 5 + 9 + 1 \equiv 0 & \pmod{11} & \text{if } p \equiv 1 & \pmod{10} \\
3^3 + 4^3 + 5^3 + 9^3 - 98 \equiv 5 + 9 + 4 + 3 + 1 \equiv 0 & \pmod{11} & \text{if } p \equiv 3 & \pmod{10}, \\
3^{-3} + 4^{-3} + 5^{-3} + 9^{-3} - 98 \equiv 9 + 5 + 3 + 4 + 1 \equiv 0 & \pmod{11} & \text{if } p \equiv -3 & \pmod{10} \\
3^{-1} + 4^{-1} + 5^{-1} + 9^{-1} - 98 \equiv 4 + 3 + 9 + 5 + 1 \equiv 0 & \pmod{11} & \text{if } p \equiv -1 & \pmod{10}
\end{array}
\]

For the second line, you just need to calculate the cubes, such as \( 5^3 = 125 = 11 \cdot 11 + 4 \). For the third and fourth lines, we can again easily find the multiplicative inverses. We conclude that \( 11 \mid f(p) \) for all \( p > 5 \).

Now we note that for \( p > 5 \), \( f(p) > 9^5 = 9 \cdot 81 \cdot 81 > 7 \cdot 11 \cdot 77 \). So we can write \( f(p) \) as \( f(p) = 7 \cdot 11 \cdot d \) with \( d > 77 \). Then we have at least 8 different divisors, namely

\[
1 < 7 < 11 < 77 < d < 7d < 11d < 77d.
\]

So no prime number greater than 5 satisfies the condition.