Problem

Source: 2018 JBMO TST- Macedonia

Tags: JMMO, Junior, Macedonia, 2018, combinatorics



A regular $2018$-gon is inscribed in a circle. The numbers $1, 2, ..., 2018$ are arranged on the vertices of the $2018$-gon, with each vertex having one number on it, such that the sum of any $2$ neighboring numbers ($2$ numbers are neighboring if the vertices they are on lie on a side of the polygon) equals the sum of the $2$ numbers that are on the antipodes of those $2$ vertices (with respect to the given circle). Determine the number of different arrangements of the numbers. (Two arrangements are identical if you can get from one of them to the other by rotating around the center of the circle).