Problem

Source: Turkey National Mathematical Olympiad 2018

Tags: number theory



Let $a_1,a_2,a_3,a_4$ be positive integers, with the property that it is impossible to assign them around a circle where all the neighbors are coprime. Let $i,j,k\in\{1,2,3,4\}$ with $i \neq j$, $j\neq k$, and $k\neq i $. Determine the maximum number of triples $(i,j,k)$ for which $$ ({\rm gcd}(a_i,a_j))^2|a_k. $$