function res = cjk(pot)

l = length(pot);

mat = [];

for k = 1:l
    mat(k,1) = 0;
end;

for k = 1:l
    mat(k,2) = 0;
end;

mat(1,1) = 1;
mat(1,2) = 2+pot(1);
mat(2,2) = -1;

for k = 3:l
    mat(k,k) = -mat(k-1,k-1);
    mat(1,k) = (2+pot(k))*mat(1,k-1) - mat(1,k-2);
    for j = 2:(k-1)
        mat(j,k) = -mat(j-1,k-1)+(2+pot(k))*mat(j,k-1)-mat(j,k-2);
    end;
end;

res = mat;

end