numtheor.spad line 451 [edit on github]
This package provides various polynomial number theoretic functions over the integers.
bernoulli(n)
returns the n
th Bernoulli polynomial B[n](x)
. Note: Bernoulli polynomials denoted B(n, x)
computed by solving the differential equation differentiate(B(n, x), x) = n B(n-1, x)
where B(0, x) = 1
and initial condition comes from B(n) = B(n, 0)
.
chebyshevT(n)
returns the n
th Chebyshev polynomial T[n](x)
. Note: Chebyshev polynomials of the first kind, denoted T[n](x)
, computed from the two term recurrence. The generating function (1-t*x)/(1-2*t*x+t^2) = sum(T[n](x)*t^n, n=0..infinity)
.
chebyshevU(n)
returns the n
th Chebyshev polynomial U[n](x)
. Note: Chebyshev polynomials of the second kind, denoted U[n](x)
, computed from the two term recurrence. The generating function 1/(1-2*t*x+t^2) = sum(T[n](x)*t^n, n=0..infinity)
.
cyclotomic(n)
returns the n
th cyclotomic polynomial phi[n](x)
. Note: phi[n](x)
is the factor of x^n - 1
whose roots are the primitive n
th roots of unity.
euler(n)
returns the n
th Euler polynomial E[n](x)
. Note: Euler polynomials denoted E(n, x)
are computed by solving the differential equation differentiate(E(n, x), x) = n E(n-1, x)
where E(0, x) = 1
and initial condition comes from E(n) = 2^n E(n, 1/2)
.
fixedDivisor(a)
for a(x)
in Z[x]
is the largest integer f
such that f
divides a(x=k)
for all integers k
. Note: fixed divisor of a
is reduce(gcd, [a(x=k) for k in 0..degree(a)])
.
hermite(n)
returns the n
th Hermite polynomial H[n](x)
. Note: Hermite polynomials, denoted H[n](x)
, are computed from the two term recurrence. The generating function is: exp(2*t*x-t^2) = sum(H[n](x)*t^n/n!, n=0..infinity)
.
laguerre(n)
returns the n
th Laguerre polynomial L[n](x)
. Note: Laguerre polynomials, denoted L[n](x)
, are computed from the two term recurrence. The generating function is: exp(x*t/(t-1))/(1-t) = sum(L[n](x)*t^n/n!, n=0..infinity)
.
legendre(n)
returns the n
th Legendre polynomial P[n](x)
. Note: Legendre polynomials, denoted P[n](x)
, are computed from the two term recurrence. The generating function is: 1/sqrt(1-2*t*x+t^2) = sum(P[n](x)*t^n, n=0..infinity)
.