Find all positive integers $a$ and $b$ for which there are three consecutive integers at which the polynomial \[ P(n) = \frac{n^5+a}{b} \] takes integer values.
1. **Define the polynomial and set up the problem:**
   We are given the polynomial \( P(n) = \frac{n^5 + a}{b} \) and need to find all positive integers \( a \) and \( b \) such that \( P(n) \) takes integer values for three consecutive integers \( n \).

2. **Introduce a new polynomial \( Q(n) \):**
   Let \( Q(n) = n^5 + a \). For \( P(n) \) to be an integer, \( b \) must divide \( Q(n) \) for three consecutive integers \( n \).

3. **Analyze the divisibility conditions:**
   We need \( b \) to divide the differences between \( Q(n) \) evaluated at consecutive integers:
   \[
   b \mid Q(n+1) + Q(n-1) - 2Q(n)
   \]
   \[
   b \mid Q(n+1) - Q(n-1)
   \]

4. **Calculate the differences:**
   \[
   Q(n+1) = (n+1)^5 + a = n^5 + 5n^4 + 10n^3 + 10n^2 + 5n + 1 + a
   \]
   \[
   Q(n-1) = (n-1)^5 + a = n^5 - 5n^4 + 10n^3 - 10n^2 + 5n - 1 + a
   \]
   \[
   Q(n+1) + Q(n-1) - 2Q(n) = (n^5 + 5n^4 + 10n^3 + 10n^2 + 5n + 1 + a) + (n^5 - 5n^4 + 10n^3 - 10n^2 + 5n - 1 + a) - 2(n^5 + a)
   \]
   Simplifying, we get:
   \[
   Q(n+1) + Q(n-1) - 2Q(n) = 20n^3 + 10n
   \]
   Therefore:
   \[
   b \mid 20n^3 + 10n
   \]

5. **Calculate the second difference:**
   \[
   Q(n+1) - Q(n-1) = (n^5 + 5n^4 + 10n^3 + 10n^2 + 5n + 1 + a) - (n^5 - 5n^4 + 10n^3 - 10n^2 + 5n - 1 + a)
   \]
   Simplifying, we get:
   \[
   Q(n+1) - Q(n-1) = 10n^4 + 20n^2 + 2
   \]
   Therefore:
   \[
   b \mid 10n^4 + 20n^2 + 2
   \]

6. **Combine the conditions:**
   \[
   b \mid 2(10n^4 + 20n^2 + 2) - n(20n^3 + 10n)
   \]
   Simplifying, we get:
   \[
   b \mid 20n^4 + 40n^2 + 4 - 20n^4 - 10n^2 = 30n^2 + 4
   \]
   Therefore:
   \[
   b \mid 30n^2 + 4
   \]

7. **Further simplification:**
   \[
   b \mid 2n(30n^2 + 4) - 3(20n^3 + 10n)
   \]
   Simplifying, we get:
   \[
   b \mid 60n^3 + 8n - 60n^3 - 30n = -22n
   \]
   Therefore:
   \[
   b \mid 22n
   \]

8. **Determine possible values of \( b \):**
   Since \( b \) must divide \( 22n \) for all \( n \), and \( \gcd(Q(n+1) - Q(n-1), n) = 1 \), we have \( \gcd(b, n) = 1 \). Thus, \( b \) must divide 22. The possible values for \( b \) are 1, 2, 11, and 22.

9. **Case analysis:**
   - **Case 1: \( b = 1 \)**
     Any integer value of \( a \) works since \( P(n) = n^5 + a \) is always an integer.
   - **Case 2: \( b = 2 \)**
     We cannot have three consecutive fifth powers with the same remainder modulo 2, so no solution exists.
   - **Case 3: \( b = 11 \)**
     We need \( n^5 + a \equiv 0 \pmod{11} \) for three consecutive \( n \). Observing the fifth powers modulo 11:
     \[
     1^5 \equiv 1, \quad 2^5 \equiv -1, \quad 3^5 \equiv 1, \quad 4^5 \equiv -1, \quad 5^5 \equiv 1 \pmod{11}
     \]
     We find that \( a \equiv -1 \pmod{11} \) or \( a \equiv 1 \pmod{11} \).
   - **Case 4: \( b = 22 \)**
     By the Chinese Remainder Theorem, we cannot have three consecutive fifth powers with the same remainder modulo 22.

10. **Conclusion:**
    The only solutions are \( (a, b) = (k, 1) \) and \( (a, b) = (11k \pm 1, 11) \) for \( k \in \mathbb{Z} \).

The final answer is \( \boxed{ (a, b) = (k, 1), (11k \pm 1, 11) } \) for \( k \in \mathbb{Z} \).