11.6. The sheriff believes that if the number of bandits he catches on a certain day is a prime number, then he is lucky. On Monday and Tuesday, the sheriff was lucky, and starting from Wednesday, the number of bandits he caught was equal to the sum of the number from the day before yesterday and twice the number from yesterday. What is the maximum number of consecutive days the sheriff could have been lucky this week? Justify your answer.
Solution: Let's say the sheriff caught 7 bandits on Monday and 3 on Tuesday. Then on Wednesday, Thursday, and Friday, he caught 13, 29, and 71 bandits, respectively. All these numbers are prime, and the sheriff has been lucky for five days in a row.

We will show that the sheriff cannot be lucky for six days in a row. Note that by Wednesday, this number is no less than $2 \cdot 2 + 3 = 7$, and it only increases from there. Therefore, it is sufficient to show that on Wednesday, Thursday, Friday, or Saturday, there will be a day when the number of bandits caught is divisible by 3.

Assume the opposite, that on all these days, the number of bandits caught is not divisible by 3. In particular, the numbers of bandits caught on Wednesday and Thursday do not divide by 3; let's denote them as $A$ and $B$ respectively. Then the number of bandits caught on Friday is $A + 2B$. There are two possible situations.

1) The remainders of $A$ and $B$ when divided by 3 are the same. Then the number $A + 2B = A + B + B$ is the sum of three numbers with the same remainder when divided by 3, so it is divisible by 3. Contradiction.
2) The remainders of $A$ and $B$ when divided by 3 are different: one is 1, the other is 2. Then the number $A + B$ is divisible by 3, so the number $A + 2B = (A + B) + B$ has the same remainder when divided by 3 as the number $B$. Therefore, the numbers of bandits caught on Thursday and Friday have the same remainder when divided by 3. Reasoning as in point 1, we get that the number of bandits caught on Saturday is divisible by 3. Again, a contradiction. The proof is complete.

Answer: 5 days.

Note: The mathematical model of the problem is as follows: Given a sequence $\left\{a_{n}\right\}$ of natural numbers, for all natural $n$ satisfying the relation $a_{n} + 2a_{n+1} = a_{n+2}$. We need to determine the maximum number of consecutive terms in this sequence that can be prime numbers.

The key point in the solution is the assertion that among any four terms of this sequence, there is at least one that is divisible by 3. This fact can be proven in different ways, including by considering all remainders when dividing $a_{1}$ and $a_{2}$ by 3. Of course, the enumeration must be complete.

From the solution, it also follows that to get five consecutive prime numbers, one of the numbers $a_{1}$ or $a_{2}$ must be equal to 3.

Recommendations for checking:

| is in the work | points |
| :--- | :--- |
| Correct and justified answer | 7 points |
| Justified that the sheriff cannot be lucky for 6 days in a row, but no justification that he can be lucky for 5 days in a row | 4 points |
| The idea of considering remainders when dividing by 3 (or any other number divisible by 3) | 2 points |
| Example where the sheriff is lucky for exactly 5 days without proof that a larger number is impossible | 1 point |
| Answer without justification or incorrect answer, as well as examples where the sheriff is lucky for fewer than 5 consecutive days | 0 points |