function mom=smom_gprudnikov_symm(dig,N,nu,alpha)
%SMOM_GPRUDNIKOV_SYMM Moments of the symmetric extension of the 
%   generalized Prudnikov weight function.
%   MOM=SMOM_GPRUDNIKOV_SYMM(DIG,N,NU,ALPHA) generates in DIG-digit 
%   arithmetic the first 2N moments (the first moment if N=0) of the
%   symmetric extension of the generalized Prudnikov weight function W(X), 
% 
%                W(X)=X^ALPHA*RHO_NU(X)
%   where
%
%          RHO_NU(X)=2*X^(NU/2)*K_NU(2*sqrt(X))  on [0,INF],
%
%   and K_NU is the second-kind modified Bessel function of real 
%   order NU.

digits(dig); v2=vpa(2);
if N>0
  mom=vpa(zeros(2*N,1));
end
v0=vpa(0); v2=vpa(2); vnu=vpa(nu); valpha=vpa(alpha); v1=vpa(1);
if N==0
  mom=v2*gamma(valpha+vnu+v1)*gamma(alpha+v1);
else
  for k=1:2*N
    km1=k-1; vkm1=vpa(km1);
    if km1==2*floor(km1/2)
      mom(k)=v2*gamma(vkm1+valpha+vnu+v1)*gamma(vkm1+valpha+v1);
    else
      mom(k)=v0;
    end
  end
end
