MathDB
find the greatest positive integer n

Source: KJMO 2020 p6

September 30, 2021
KJMOKMO

Problem Statement

for a positive integer nn, there are positive integers a1,a2,...ana_1, a_2, ... a_n that satisfy these two. (1) a1=1,an=2020a_1=1, a_n=2020 (2) for all integer ii, iisatisfies 2in,aiai1=22\leq i\leq n, a_i-a_{i-1}=-2 or 33. find the greatest nn