restart:

K:=proc(n::nonnegint)

if n=0 then 1

elif n=1 then x

else ((2*n-1)*x*K(n-1)-(n-1)*K(n-2))/n

fi

end:

a:=expand(K(7,x));

[Maple Math]

b:=orthopoly [P](7,x);

[Maple Math]

testeq(a=b);

[Maple Math]