Let be a sequence of length such that:
- for all :
- for all and with : .
There are only five such sequences of length , namely:
, , , and .
There are such sequences of length ; three examples are given below:
, , .
Let denote the number of such sequences of length .
You are given that and .
Find and give your answer modulo .
Write-up coming later
The complete problem is available here. An approach, code, and answer will be added later.