* Joerg Arndt <arndt@jjj.de> [Apr 15. 2016 14:50]:
* Keith F. Lynch <kfl@KeithLynch.net> [Apr 15. 2016 10:54]:
Andy Latto <andy.latto@pobox.com> wrote: [...]
Rot13 has a period of two, meaning that encryption and decryption are the same operation. A period of N means that if you encrypt (or decrypt) N times, you'll get the original text back, but never any sooner (unless you avoid certain letters).
What periods can simple substitution ciphers have on an alphabet of 26 letters? How many are there of each? In particular, what's the shortest period that doesn't exist, and what's the longest period that does? And how would you compute those for alphabets of other sizes?
For an alphabet of n letters the possible orders are gcd_{p_i \in P}{ p_i } where P is a partition of n into parts p_i.
Brrrr, read lcm where I put gcd.
The maxima give sequence https://oeis.org/A000793 a(26) = 1260
A program (not easy to read, apologies) to compute the sequence is http://jjj.de/fxt/demo/seq/#A000793
Fun question: is the maximum always obtained with a partition into distinct parts? If "yes", then A000793 could be computed a bit faster. If "no", then that would give a sequence for the OEIS.
Best regards, jj
[...]
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun