function a = ijfact3_matrix ( n )

%*****************************************************************************80
%
%% ijfact3_matrix returns the IJFACT3 matrix.
%
%  Formula:
%
%    A(I,J) = 1 / ( (I+J-1)! )
%
%  Example:
%
%    N = 4
%
%   1     1/2   1/6    1/24
%   1/2   1/6   1/24   1/120
%   1/6   1/24  1/120  1/720
%   1/24  1/120 1/720  1/5040
%
%  Properties:
%
%    A is symmetric: A' = A.
%
%    Because A is symmetric, it is normal.
%
%    Because A is normal, it is diagonalizable.
%
%    A is a Hankel matrix: constant along anti-diagonals.
%
%    The family of matrices is nested as a function of N.
%
%    A is not diagonally dominant.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    02 December 2019
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    Karen Habermann,
%    An explicit formula for the inverse of a factorial Hankel matrix,
%    arXiv:1808.02880v2 [math.NA] 14 Aug 2018
%
%  Input:
%
%    integer N, the order of A.
%
%  Output:
%
%    real A(N,N), the matrix.
%
  a = zeros ( n, n );

  for i = 1 : n
    for j = 1 : n
      a(i,j) = 1.0 / factorial ( i + j - 1 );
    end
  end

  return
end
