function res = polyrec2(eps,pot)

le = length(eps);
lp = length(pot);
mat = [];

for k = 1:le
    mat(1,k) = 2+pot(1)-eps(k);
end;

for k = 1:le
    mat(2,k) = (2+pot(1)-eps(k))*(2+pot(2)-eps(k))-1;
end;

for ke = 1:le
    for kp = 3:lp
            mat(kp,ke) = mat(kp-1,ke)*(2+pot(kp-1)-eps(ke))-mat(kp-2,ke);
       
    end;
end;

res = mat;

end

