function d = smith_determinant ( n )

%*****************************************************************************80
%
%% smith_determinant() returns the determinant of the SMITH matrix.
%
%  Formula:
%
%    det(A) = phi(1) * phi(2) * ... * phi(n)
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    30 June 2022
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    John D Cook,
%    Smith's Determinant,
%    https://www.johndcook.com/blog/2013/07/31/smiths-determinant/
%    Posted 31 July 2013.
%
%    Donald Knuth,
%    The Art of Computer Programming,
%    Volume 2, Seminumerical Algorithms,
%    Section 4.5.2, problem 42.
%    Third Edition,
%    Addison Wesley, 1997,
%    ISBN: 0201896842,
%    LC: QA76.6.K64.
%
%  Input:
%
%    integer N: the order of the matrix.
%
%  Output:
%
%    real D, the determinant.
%
  d = 1.0;
  for i = 1 : n
    d = d * eulerPhi ( i );
  end

  return
end
