How many different ciphertexts in repeated substitution cipher?

Consider an alphabet with 26 letters. Then a substitution cipher has $$26!$$ possible ciphertexts (with every letter substituted). What about repetive substitutions on a 5 letter word for example? How many different ciphertexts will result? Like $$\sigma(a)=b, \sigma(b)=c, \sigma(c)=a$$, then $$abc \rightarrow bca \rightarrow cab \rightarrow abc$$ so two ciphertexts for $$|A|=3$$.But what about generally?

• It's very hard to tell what you're trying to ask here. Two people have guessed and tried to answer below, but their answers are different because they're answering different questions. And it looks like you've accepted one of the answers, but I'm honestly not sure if that's because you understood it and it matches what you intended to ask, or because you didn't fully understand if but it just looked vaguely right. If the former, please edit your question to make it clearer now that you know the right terminology. Either way, I'd suggest this question should be closed until it's clarified. Mar 12 at 0:17

What you are asking is how many times do you have to apply the substitution on a plaintext to arrive back at the plain text. One observation is that it will depend on the order of the substitution as an element of $$S_{26}$$, the permutation group on 26 elements. If your permutation has order $$n$$, than applying it $$n$$ times is the same as the identity permutation. For a given substitution, it is not hard to determine its order.
The maximum possible cycle length of a permutation of $$n$$ elements is given by Landau's function. For $$n=26$$ the answer is 1260