Problem

Source: Lotfi Zadeh Olympiad 2021, Problem 4

Tags: Polygons, angles, Lotfi Zadeh MO



Find the number of sequences of $0, 1$ with length $n$ satisfying both of the following properties: There exists a simple polygon such that its $i$-th angle is less than $180$ degrees if and only if the $i$-th element of the sequence is $1$. There exists a convex polygon such that its $i$-th angle is less than $90$ degrees if and only if the $i$-th element of the sequence is $1$.