For two integers , we define an -MPS (Mirror Power Sequence) to be an infinite sequence of integers such that for all , and . Examples of such sequences are the two -MPS sequences made of alternating and .
Note that even though such a sequence is uniquely determined by and , for most values such a sequence does not exist. For example, no -MPS exists for .
Define to be the number of -MPS for some , and .
You are given that , , , and .
Find .
Write-up coming later
The complete problem is available here. An approach, code, and answer will be added later.