for a positive integer , there are positive integers that satisfy these two.
(1)
(2) for all integer , satisfies or .
find the greatest
Problem 1303
Official solution
1. Let be the number of values of where and be the number of values of where .
2. From the given conditions, we have:
Therefore, we can write:
Simplifying, we get:
3. We also know that the total number of steps from to is , so:
4. To find , we need to solve the system of equations:
5. Solving for in terms of from the second equation:
6. Substituting into the first equation:
Simplifying, we get:
7. Solving for :
8. Since must be an integer, must be even. This implies must be odd because 2017 is odd.
9. To maximize , we need to find the largest such that is still a positive integer. Since must be odd, let for some integer .
10. Substituting into the equation for :
11. To ensure is maximized, we need to be as large as possible while keeping positive. The smallest such that is positive is when:
Since must be an integer, the smallest is 202.
12. Substituting into the equation for :
This is incorrect, so we need to re-evaluate our approach. Instead, we should consider the constraints and the sequence construction directly.
13. Given the constraints, we can construct a sequence that satisfies the conditions for :
This sequence can be constructed by ensuring the differences are either or and the sequence reaches 2020 at the 2019th term.
Therefore, the largest possible value of is .