Re: Solution Re: [math-fun] 1,2,3,5,18 puzzle
Fred wries: << A few years ago a local schoolteacher called Neil Hamilton observed that the original Collatz problem, for the function f(x) = 3x+1 if x is odd, x/2 if x is even is equivalent to the analogous problem for the new function g(y) = (y+1)/4 if y mod 4 = 3, (3y+1)/4 if y mod 4 = 1, 3y/2 if y mod 4 = 0,2. While I said at the time that I thought this was probably well-known, I didn't find any mention of it in the literature; and it did occur to me to wonder whether there had been any systematic attempt to investigate such equivalences.
Yes, this is well-known, and sometimes the way that Jeff Lagarias prefers to define the Collatz function. (My own preference is to let f(N) = (3N+1)/(the largest power of 2 that divides 3N+1). which means the domain and range may be considered to be the odd integers.) --Dan
--- Daniel Asimov <dasimov@earthlink.net> wrote:
(My own preference is to let f(N) = (3N+1)/(the largest power of 2 that divides 3N+1). which means the domain and range may be considered to be the odd integers.)
--Dan
Expressed this way, it looks like it could be easily implemented in hardware. Add n to its left-shift, add 1, then right shift the zeroes off the end. Has anyone done this? Gene __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
participants (2)
-
Daniel Asimov -
Eugene Salamin