function ab=sr_stieltjes_wigert(dig,N,sigma,m)
%SR_STIELTJES_WIGERT Recurrence coefficients for Stieltjes--Wigert
%polynomials
%   AB=SR_STIELTJES_WIGERT(DIG,N,SIGMA,M) generates in DIG-digit
%   arithmetic the Nx2 array AB of the first N recurrence 
%   coefficients for the Stieltjes-Wigert weight function 
%   w(x)=(x^M/(sqrt(2*pi)*SIGMA))*exp(-(log(x))^2/(2*SIGMA^2)) 
%   on [0,Inf], SIGMA>0, M an integer.

digits(dig); sigma=vpa(sigma); m=vpa(m);
ab=vpa(zeros(N,2)); s1=vpa(1); s2=vpa(2); s3=vpa(3);
q=exp(sigma^2); b0=q^(((m+s1)^2)/s2); 
k=(1:N)'; k0=2:N;
ab(:,1)=q.^(k+m-vpa(1/2)).*(q.^k+q.^(k-1)-s1);
ab(:,2)=[b0 q.^(s3*k0+s2*m-s3).*(q.^(k0-1)-s1)]';
