function x = p05_x ( n )

%*****************************************************************************80
%
%% p05_x() returns the least squares solution X for problem 5.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    13 January 2021
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N, the number of variables.
%
%  Output:
%
%    real X(N,1), the least squares solution.
%
  for i = 1 : n
    x(i,1) = r8_mop ( i + 1 ) * i ...
      * nchoosek ( n + i - 1, n - 1 ) * nchoosek ( n, n - i );
  end

  return
end
