function pdf = log_series_pdf ( x, a )

%*****************************************************************************80
%
%% log_series_pdf() evaluates the Logarithmic Series PDF.
%
%  Discussion:
%
%    PDF(X)(A) = - A^X / ( X * log ( 1 - A ) )
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    20 February 1999
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer X, the argument of the PDF.
%    0 < X
%
%    real A, the parameter of the PDF.
%    0.0 < A < 1.0.
%
%  Output:
%
%    real PDF, the value of the PDF.
%
  if ( x <= 0 )
    pdf = 0.0;
  else
    pdf = - a^x / ( x * log ( 1.0 - a ) );
  end

  return
end
