We call a composite positive integer $n$ nice if it is possible to arrange its factors that are larger than $1$ on a circle such that two neighboring numbers are not coprime. How many of the elements of the set $\{1, 2, 3, ..., 100\}$ are nice?
Source: 2014 Romania JBMO TST 4.1
Tags: number theory, combinatorics
We call a composite positive integer $n$ nice if it is possible to arrange its factors that are larger than $1$ on a circle such that two neighboring numbers are not coprime. How many of the elements of the set $\{1, 2, 3, ..., 100\}$ are nice?