% SMM_LOG  Symbolic counterpart of mm_log.m
%
function mm=smm_log(dig,N,a)
if a<=-1, error('a out of range in mm_log'), end
digits(dig);
c=vpa(1);
for n=1:N
  if(a-floor(a)==0 & a<n-1)
    p=vpa(n-a-1:n+a);
    mm(n)=vpa((-1)^(n-1-a)/prod(p));
    mm(n)=vpa((gamma(a+1))^2*mm(n));
  else
    if n==1
      mm(1)=vpa(1/(a+1)^2);
    else 
      k=1:n-1;
      s=vpa(1./(a+1+k)-1./(a+1-k));
      p=vpa((a+1-k)./(a+1+k));
      mm(n)=vpa((1/(a+1)+sum(s))*prod(p)/(a+1));
    end
  end
  mm(n)=c*mm(n); c=vpa(n*c/(2*(2*n-1)));
end
