Given a character string , we define to be the length of the longest substring of which appears at least times in , or if such a substring does not exist. For example, because of the three occurrences of the substring , and because of the repeated substring . Note that the occurrences can overlap.
Let , and be the sequences defined by:
(where is the golden ratio)
and the character string . You are given that , , , , , , , and that the sum of non-zero for is .
Find the sum of non-zero for .
Write-up coming later
The complete problem is available here. An approach, code, and answer will be added later.