function [U,d,xn]=sUconj_restr_blockhahn(dig,n)
%SCONJ_RESTR_BLOCKHAHN The matrix U of the restricted Stenger 
%conjecture and its eigenvalues for the (N+1)-block Hahn weight 
%function
%   [U,D,XN]=SUCONJ_RESTR_BLOCKHAHN(DIG,n) generates in DIG-digit
%   arithmetic the nxn matrix U and its eigenvalues D for the
%   (N+1)-block Hahn weight function w(x;N+1,a,b). The 
%   elements of U are computed exactly by ceil(n/2)-point
%   Gauss-Legendre quadrature on [0,1]. The output variable XN
%   is the DIG-digit vector of the zeros of the nth-degree
%   orthogonal polynomial. 

global ab ab0 
digits(dig);
U=vpa(zeros(n)); ng=ceil(n/2);
abn=ab(1:n,:); ab0ng=ab0(1:ng,:); 
xwn=sgauss(dig,n,abn); xn=xwn(:,1); 
xw0ng=sgauss(dig,ng,ab0ng); x0ng=xw0ng(:,1); w0ng=xw0ng(:,2);
for j=1:n
  xj=xn(j); 
  for k=1:n
    s=vpa(0);
    for i=1:ng
      lag=slagrange(dig,n,xn,xj*x0ng(i));
      s=s+w0ng(i)*lag(k);
    end
    U(j,k)=xj*s;
  end
end
d=eig(U);
