function t = pivot_sequence_random ( n )

%*****************************************************************************80
%
%% pivot_sequence_random() selects a pivot sequence at random.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    24 June 2024
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer n: the number of steps.
%
%  Output:
%
%    t(n): a randomly selected pivot_sequence.
%
  t = zeros ( n, 1 );

  for i = 1 : n
    t(i) = randi ( [ 1, n + 1 - i ], 1 );
  end

  return
end
