function ab=sr_assoc_legendre(dig,N)
%SR_ASSOC_LEGENDRE Recurrence coefficients for associated
%Legendre polynomials.
%   AB=SR_ASSOC_LEGENDRE(DIG,N) generates in DIG-digit
%   arithmetic the Nx2 array AB of the first N recurrence
%   coefficients for the associated Legendre weight function
%   w(x)=[pi^2+log^2((1+x)/(1-x))]^(-1) on [-1,1].

digits(dig); s1=vpa(1); s2=vpa(2); s3=vpa(3);
ab=vpa(zeros(N,2));
ab(1,2)=vpa(1/6);
for n=2:N
  k=vpa(n-1);
  ab(n,2)=(k+s1)^2/((s2*k+s1)*(s2*k+s3));
end
