The Collatz conjecture states that starting from any positive integer, the sequence eventually reaches the cycle .
We shall define the sequence prefix for the Collatz sequence starting with as the sub-sequence of all numbers not a power of ( is considered a power of for this problem). For example:
Any number invalidating the conjecture would have an infinite length sequence prefix.
Let be the set of all sequence prefixes of length . Two sequences and in are said to belong to the same prefix family if if and only if for all .
For example, in , is in the same family as , but not .
Let be the number of distinct prefix families in .
You are given , , .
Find .
Write-up coming later
The complete problem is available here. An approach, code, and answer will be added later.