function x = diophantine_5d_positive ( a, b )

%*****************************************************************************80
%
%% diophantine_5d_positive finds positive diophantine solutions.
%
%  Discussion:
%
%     We are given a Diophantine equation 
%
%       a1 x1 + a2 x2 + a3 x3 + a4 x4 + a5 * x5 = b
%
%     for which the coefficients a are positive integers, and
%     the right hand side b is a nonnegative integer.
%
%     We are seeking all strictly positive integer solutions x.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    18 May 2020
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer a(5): the coefficients of the Diophantine equation.
%
%    integer b: the right hand side.
%
%  Output:
%
%    integer x(5,k): solutions to the equation.
%
   bn = b - sum ( a );

   x = diophantine_5d_nonnegative ( a, bn );

   x = x + 1;

  return
end

