function res = polyrec(eps,pot)

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

for k = 1:le
    mat(1,k) = 1;
end;

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

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

res = mat;

end

