Consider coins arranged in a circle where each coin shows heads or tails. A move consists of turning over consecutive coins: tail-head or head-tail. Using a sequence of these moves the objective is to get all the coins showing heads.
Consider the example, shown below, where and and the initial state is one coin showing tails (black). The example shows a solution for this state.
For given values of and not all states are solvable. Let be the number of states that are solvable. You are given that , and .
Further define:
You are also given that , and
Find . Give your answer modulo .
Write-up coming later
The complete problem is available here. An approach, code, and answer will be added later.