Problem

Source: Caucasus MO 2024, Seniors P6

Tags: number theory



Given is a permutation of $1, 2, \ldots, 2023, 2024$ and two positive integers $a, b$, such that for any two adjacent numbers, at least one of the following conditions hold: 1) their sum is $a$; 2) the absolute value of their difference is $b$. Find all possible values of $b$.