 
 
 
 
 
 
Terras inverse
- To: mathgroup at smc.vnet.net
- Subject: [mg43471] Terras inverse
- From: "Gino Prosapio" <billythecazz at libero.it>
- Date: Wed, 17 Sep 2003 08:00:25 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
I'm looking for a fast algorithm of inverse Terras/Collatz function (i.e.
f(m)={(2m-1)/3 (if integer), 2m}). This program should return the list:
{1},{2},{4},{8},{5,16},{3,10,32},{6,20,21,24},{12,13,40,42,128}... etc.
That correspond to the tree
                   1
                   |
                   2
                   |
                   4
                   |
                   8
                  / \
                 /   \
                /     \
               5       16
              / \       \
             3  10      32
              \  \     /  \
               6  20  21  64
 ...          .................  .
Thank you.

