# Caesar would be pleased

U PROP BY THERE, USE PARS PAR THERE PROP
BY THERE IYBSM PAR YUCR THER, USE YH HS.
THINE BP AUQQRS PAUP PAR HGBMBSUN PROP
BY GRUTARE UP YHCR YPUMR?

### Answer still in progress

I have decoded the cryptogram as it stands (not manually, but with a website) and it results in this:

A TEXT IS CODED, AND THEN THE CODED TEXT IS CODED USING THE SAME CODE, AND SO ON. COULD IT HAPPEN THAT THE ORIGINAL TEXT IS REACHED AT SOME STAGE?

I haven't found the answer to this yet, though. Just wanted to get this up so others could use it. I have a very vague hypothesis that it will happen after 26 iterations, but this is completely unsupported.

EDIT: Thanks to @Ross Millikan in the comments, the answer is actually 1260 - the highest LCM of a set of numbers with a sum of 26. The reason this works is because there can be "loops" where A is substituted with B, B with C, and C with A. This loop has a size of 3. The loops in a substitution cipher can sum to 26, and the 1260 figure comes from loops of 4, 5, 7, and 9 and an extra letter that is substituted with itself. If this isn't legal, then the actual amount is something else - I'll find that eventually.

• That would be the upper bound, right? (11*17*19*21*23*24*45*26, if anyone's interested) Commented Mar 3, 2015 at 18:14
• @EngineerToast Yes - it can happen earlier, but it will always happen after that many iterations. Commented Mar 3, 2015 at 18:32
• The maximum cycle length is the greatest number that is the LCM of a set of numbers summing to 26. This is given in oeis.org/A000793 as $1260=4\cdot 9 \cdot 5\cdot 7$ If you break the permutation into cycles, the overall cycle length is the LCM of the lengths of the various cycles. Commented Mar 3, 2015 at 20:23
• If you don't need an exact answer, then you could say that it will happen by the 26th iteration Commented Mar 3, 2015 at 21:24
• @xnor As far as I know, yes. I don't really see the point in the Caesar clue or the cryptogram itself. Commented Mar 4, 2015 at 2:48