My initial calculations show that the orbit of 0 under "add 1 and reverse bits" is periodic: - if the number of bits (m) is odd, then the period is 2^m, - if the number of bits is even, then the period is 2^(m/2+1)-1. Verified from m=1 to 30 bits. Kerry On Tue, Sep 29, 2015 at 10:32 AM, Adam P. Goucher <apgoucher@gmx.com> wrote:
Here's a Mathematica app for 'add c and reverse':
Manipulate[ Graph[Map[(FromDigits[#, 2] -> Mod[FromDigits[Reverse[#], 2] + c, 2^m]) &, Tuples[{0, 1}, m]]], {m, 2, 10, 1}, {{c, 1}, 1, 2^m - 1, 1}]
Sent: Tuesday, September 29, 2015 at 2:49 PM From: "James Propp" <jamespropp@gmail.com> To: math-fun <math-fun@mailman.xmission.com> Subject: [math-fun] Add 1 and reverse
I've been playing with the compound operation on bit-strings of length m in which you (a) add 1 mod 2^m and (b) reverse the order of the bits.
Has anyone seen this before? It seems sufficiently simple that I doubt I'm the first person to have played with it.
Jim Propp _______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun