NumberTheory - Maple Programming Help

Home : Support : Online Help : Mathematics : Number Theory : NumberTheory/KroneckerSymbol

NumberTheory

 KroneckerSymbol
 generalized Jacobi symbol
 JacobiSymbol
 generalized Legendre symbol
 LegendreSymbol

 Calling Sequence KroneckerSymbol(a, n) JacobiSymbol(a, m) LegendreSymbol(a, m)

Parameters

 a - integer n - integer m - positive odd integer

Description

 • The KroneckerSymbol(a, n) command computes the Kronecker symbol of a and n.
 • The alternative calling sequences, JacobiSymbol(a, m) and LegendreSymbol(a, m), have return values equal to KroneckerSymbol(a, m), but m must be a positive odd integer.
 • The Legendre symbol is typically defined only for second arguments that are prime, but due to primality checking being expensive, here LegendreSymbol is an alias of JacobiSymbol.
 • If n is equal to $u\left(\prod _{i=1}^{k}{p}_{i}^{{d}_{i}}\right)$ where $u$ is $-1$ or $1$ and the ${p}_{i}$ are distinct primes, then the Kronecker symbol $\left(\frac{a}{n}\right)$ is given by $\left(\frac{a}{u}\right)\prod _{i=1}^{k}{\left(\frac{a}{{p}_{i}}\right)}^{{d}_{i}}$, where $\left(\frac{a}{k}\right)$ is the usual Legendre symbol, except for the following cases.

$\left(\frac{a}{0}\right)$ is equal to $1$ if $a$ is equal to $1$ or $-1$. Otherwise it is equal to $0$.

$\left(\frac{a}{-1}\right)$ is equal to $-1$ if $a$ is less than $0$. Otherwise it is equal to $1$.

$\left(\frac{a}{1}\right)$ is always equal to $1$.

$\left(\frac{a}{2}\right)$ is equal to $\left(\frac{2}{a}\right)$ if $a$ is odd. Otherwise it is equal to $0$.

Examples

 > $\mathrm{with}\left(\mathrm{NumberTheory}\right):$

$22$ is congruent to $0$ modulo $11$.

 > $\mathrm{LegendreSymbol}\left(22,11\right)$
 ${0}$ (1)

$9$ is a quadratic residue modulo $11$.

 > $\mathrm{LegendreSymbol}\left(9,11\right)$
 ${1}$ (2)

$10$ is a quadratic non-residue modulo $11$.

 > $\mathrm{LegendreSymbol}\left(10,11\right)$
 ${-1}$ (3)

$11$ is congruent to $2$ modulo $3$ and is a quadratic non-residue modulo $3$.

 > $\mathrm{KroneckerSymbol}\left(11,{3}^{2}\right)$
 ${1}$ (4)
 > $\mathrm{KroneckerSymbol}\left(9,2\cdot 11\right)$
 ${1}$ (5)

Compatibility

 • The NumberTheory[KroneckerSymbol], NumberTheory[JacobiSymbol] and NumberTheory[LegendreSymbol] commands were introduced in Maple 2016.