Let n≥2 be an integer. Alex writes the numbers 1,2,...,n in some order on a circle such that any two neighbours are coprime. Then, for any two numbers that are not comprime, Alex draws a line segment between them. For each such segment s we denote by ds the difference of the numbers written in its extremities and by ps the number of all other drawn segments which intersect s in its interior.
Find the greatest n for which Alex can write the numbers on the circle such that ps≤∣ds∣, for each drawn segment s. combinatoricsgeometryJuniorBalkanshortlist