The inverse Collatz Conjecture
Perl 6, 30 bytes



{$_,{$_%2??$_+&gt;1!!$_*3+1}...0}


Try it online!

Anonymous code block that returns a sequence.

Explanation:

{$_,{$_%2??$_+&gt;1!!$_*3+1}...0}
{                            }   # Anonymous code block
   ,                     ...     # Define a sequence
 $_                              # That starts with the given value
    {                   }        # With each element being
     $_%2??     !!               # Is the previous element odd?
           $_+&gt;1                 # Return the previous element bitshifted right by 1
                  $_*3+1         # Else the previous element multiplied by 3 plus 1
                            0    # Until the element is 0