function collatz_inverse_test ( )

%*****************************************************************************80
%
%% collatz_inverse_test() tests collatz_inverse().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    15 June 2022
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'collatz_inverse_test():\n' );
  fprintf ( 1, '  collatz_inverse() computes the inverse image of\n' );
  fprintf ( 1, '  a set of numbers under the Collatz transformation.\n' );

  for step = 0 : 5
    if ( step == 0 )
      t = [ 1, 10, 16 ];
    else
      t = collatz_inverse ( t );
    end
    fprintf ( 1, '  Step = %d\n', step );
    t = sort ( t );
    disp ( t );
  end

  return
end
