function ab=sr_kravchuk_ops(dig,N,p)
%SR_KRAVCHUK_OPS Recurrence coefficients for the Kravchuk 
%orthogonal polynomials.
%   AB=SR_KRAVCHUK_OPS(DIG,N,P) generates in DIG-digit arithmetic 
%   the (N+1)x2 array AB of the N+1 recurrence coefficients for
%   the weight function w(k)=(N choose k)*P^k*(1-P)^(N-k), k=0:N,
%   0<P<1.

digits(dig); 
ab=vpa(zeros(N+1,2)); 
sp=vpa(p); sN=vpa(N); s1=vpa(1); s2=vpa(2);
k=vpa(1:N+1);
ab(:,1)=k-1+sp*(sN-s2*(k-1));
k=vpa(1:N);
ab(:,2)=[s1 sp*(s1-sp)*k.*(N-k+1)]';
