% SMM_LOGSQ Symbolic counterpart of mm_logsq.m
%   
function mm=smm_logsq(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 n==1
    mm(1)=vpa(2/(a+1)^3);
  else 
    k=1:n-1;
    s1=vpa(k./((k+a+1).*(k-a-1))); sig1=sum(s1);
    s2=vpa(k./((k+a+1).^2.*(k-a-1).^2)); sig2=sum(s2);
    p0=vpa((a+1-k)./(a+1+k)); p=prod(p0);
    mm(n)=vpa((2/(a+1)^3)*(1+2*(a+1)*sig1+2*(a+1)^2*sig1^2 ...
      -2*(a+1)^3*sig2)*p);
  end
  mm(n)=c*mm(n); c=vpa(n*c/(2*(2*n-1)));
end
