Problem

Source:

Tags: algebra, number theory



$N$ numbers - ones and twos - are arranged in a circle. We mean a number formed by several digits arranged in a row (clockwise or counterclockwise). For what is the smallest value of $N$, all four-digit numbers whose writing contains only numbers $1$ and $2$, could they be among those shown?