Periodic strings I wish to ask a problem in periodic strings, it might be well-known but I am a beginner in this subject, so I am very glad if someones can show me. My problem is that can we add some string to the end of a periodic string ($S$) to have a new periodic string ($S'$)? If yes, what are the conditions?
More formally, given
$$S = [a_1 a_2 ... a_n]_t$$​
- S is a periodic string (a string of $t$ repeated string $a_1 a_2 ... a_n$​), where $n > 1$ and $t > 1$ and $a_i∈ A$ where $A$ is the alphabet (here we only consider the minimal $n$ such that $S$ is a period string - there does not exist $n'<n$ such that $S$ is a period string of consecutive strings of length $n'$). Suppose that if we concatenate a string [$c_1 c_2...c_k$] to $S$ ($c_j∈ A$​ for all $j = 1,...,k$), then we have:
$$S' = [a_1 a_2 ... a_n]_t [c_1 c_2...c_k].$$​
So, does there exist the positive integers $m, s (m>1,s>1)$ such that $S' = [a_{\pi(1)}...a_{π(m)}]_s$​ - another periodic string, where $π$ is some permutation from $\mathbf N$ to $\mathbf N$? If yes, what are the conditions? And are there some good algorithms to test this problem?
We see a trivial case when $[c_1 c_2...c_k] = [a_1 a_2 ... a_n]_v$ for any $v \in \mathbf N^*$. Do we have other cases? Could someone show me some researchs in this problem?
Thank you very much for your attention!
 A: I'll use exponents instead of subscripts to show repetition. 
To have nontrivial examples, the power of the longer word must be two or three, and you can't have two complete repetitions of the longer word within the power of the shorter word. For example, $[abababa]^2$ is a prefix of $[abababaab]^2$ and $[abababaab]^3$.
It suffices to consider the case that the words have lengths that are relatively prime. Otherwise, a nontrivial example would force the existence of a nontrivial example on a subsequence. So, assume the words have coprime lengths, so the shorter has length $m$ and the longer has length $n$.
If the powers of the shorter word contain the square of the longer word and the lengths are coprime, this forces a chain of equalities connecting every position. Consider $a_0=a_n=a_{n-m}=...$ where at each step the index increases by $n$ or decreases by $m$, and the index stays smaller than $2n$. The indices cover every residue class mod $m$ since $n$ and $m$ are coprime, so this forces $a_0=a_1=...=a_{m-1}$ and thus if these are the minimal periods, $m=n=1$. 
