4. Find all positive integers $a, b$ such that: there exist three consecutive integers for which the polynomial $P(n)=\frac{n^{5}+a}{b}$ takes integer values.

Translate the above text into English, please retain the original text's line breaks and format, and output the translation result directly.
4. Let three consecutive integers be $x-1, x, x+1$ such that
$$
\begin{array}{l}
(x-1)^{5}+a \equiv 0(\bmod b), \\
x^{5}+a \equiv 0(\bmod b), \\
(x+1)^{5}+a \equiv 0(\bmod b) .
\end{array}
$$

Then $A=(x+1)^{5}-(x-1)^{5}$
$$
\begin{array}{l}
=10 x^{4}+20 x^{2}+2 \equiv 0(\bmod b), \\
B=(x+1)^{5}-x^{5} \\
=5 x^{4}+10 x^{3}+10 x^{2}+5 x+1 \\
\equiv 0(\bmod b), \\
C=(x+1)^{5}+(x-1)^{5}-2 x^{5} \\
=20 x^{3}+10 x \equiv 0(\bmod b) .
\end{array}
$$

Thus, $D=4 x A-\left(2 x^{2}+3\right) C$
$$
\begin{array}{l}
=-22 x \equiv 0(\bmod b), \\
22 B+\left(5 x^{3}+10 x^{2}+10 x+5\right) D \\
=22 \equiv 0(\bmod b) .
\end{array}
$$

Therefore, $b=1,2,11,22$.
From equation (1), we have
$$
B=2\left(5 x^{3}+5 x^{2}\right)+5\left(x^{4}+x\right)+1
$$

is odd, so $b$ must be odd, hence $b=1,11$.
When $b=1$, $P(n)=n^{5}+a$, so any positive integer $a$ satisfies the requirement;
When $b=11$, $n \equiv 0,1, \cdots, 10(\bmod 11)$, then
$$
\begin{aligned}
n^{5} \equiv & 0,1,-1,1,1,1,-1,-1,-1,1, \\
& -1(\bmod 11) .
\end{aligned}
$$

Therefore, only when $a \equiv \pm 1(\bmod 11)$, there exist three consecutive integers such that $P(n)=\frac{n^{5}+a}{11}$ are all integers.
$$
\begin{aligned}
\text { Hence }(a, b)= & (k, 1),(11 k-10,11), \\
& (11 k-1,11)\left(k \in \mathbf{N}_{+}\right) .
\end{aligned}
$$