function lambda = tribonacci2_eigenvalues ( n )

%*****************************************************************************80
%
%% tribonacci2_eigenvalues() returns the eigenvalues of the TRIBONACCI2 matrix.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    13 May 2021
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N, the order of the matrix.
%
%  Output:
%
%    real LAMBDA(N,1), the eigenvalues.
%
  lambda = zeros ( n, 1 );

  if ( 3 <= n )

    [ alpha, beta, gamma ] = tribonacci_roots ( );

    lambda(1) = alpha;
    lambda(2:n-2) = 1.0;
    lambda(n-1) = beta;
    lambda(n) = gamma;


  end

  return
end
