7 #include "cl_univpoly_integer.h"
12 #include "cl_integer.h"
14 const cl_UP_I cl_laguerre (sintL n)
16 // The Laguerre polynomials L_n(x) are defined as
19 // L_n(x) = exp(x) (----) (x^n exp(-x))
22 // They satisfy the recurrence relation
25 // L_{n+1}(x) = (2n+1-x) L_n(x) - n^2 L_{n-1}(x) for n >= 0.
28 // L_n(x) satisfies the differential equation
29 // x*L_n''(x) + (1-x)*L_n'(x) + n*L_n(x) = 0.
31 // Proof: See elsewhere.
34 // The coefficients c_{n,k} of L_n(x) = sum(k=0..n, c_{n,k} x^k)
37 // c_{n,k} = (k+1)^2/(k-n)*c_{n,k+1}
39 // It follows that for n>=0
41 // L_n(x) = sum(j=0..n, (-1)^(n-j) n!^2/j!(n-j)!^2 x^(n-j))
43 var cl_univpoly_integer_ring R = cl_find_univpoly_ring(cl_I_ring);
44 var cl_UP_I l = R->create(n);
46 var cl_I c_k = (evenp(n) ? 1 : -1);
52 c_k = exquo((cl_I)(k+1) * (cl_I)(k+1) * c_k,