Long substring with many repetitions (noch nicht übersetzt)

Problem 691

Given a character string s, we define L(k,s) to be the length of the longest substring of s which appears at least k times in s, or 0 if such a substring does not exist. For example, L(3,“bbabcabcabcacba”)=4 because of the three occurrences of the substring “abca”, and L(2,“bbabcabcabcacba”)=7 because of the repeated substring “abcabca”. Note that the occurrences can overlap.

Let an, bn and cn be the 0/1 sequences defined by:

  • a0=0
  • a2n=an
  • a2n+1=1an
  • bn=n+1φnφ (where φ is the golden ratio)
  • cn=an+bn2anbn

and Sn the character string c0cn1. You are given that L(2,S10)=5, L(3,S10)=2, L(2,S100)=14, L(4,S100)=6, L(2,S1000)=86, L(3,S1000)=45, L(5,S1000)=31, and that the sum of non-zero L(k,S1000) for k1 is 2460.

Find the sum of non-zero L(k,S5000000) for k1.