KroneckerSymbol
The Kronecker symbol.
Syntax
-
KroneckerSymbol(a, n)
-
a
is an integer -
n
is an integer
-
Description
The Kronecker symbol is an extension of the Jacobi symbol to all integers n
. Hence, it is also an extension of the Legendre symbol.
Examples
matrix(compute(KroneckerSymbol(a, n), n, 1, 20, a, 1, 20))
⎛ 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1⎞ ⎜ 1 0 −1 0 −1 0 1 0 1 0 −1 0 −1 0 1 0 1 0 −1 0⎟ ⎜ 1 −1 0 1 −1 0 1 −1 0 1 −1 0 1 −1 0 1 −1 0 1 −1⎟ ⎜ 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0⎟ ⎜ 1 −1 −1 1 0 1 −1 −1 1 0 1 −1 −1 1 0 1 −1 −1 1 0⎟ ⎜ 1 0 0 0 1 0 1 0 0 0 1 0 −1 0 0 0 −1 0 −1 0⎟ ⎜ 1 1 −1 1 −1 −1 0 1 1 −1 1 −1 −1 0 1 1 −1 1 −1 −1⎟ ⎜ 1 0 −1 0 −1 0 1 0 1 0 −1 0 −1 0 1 0 1 0 −1 0⎟ ⎜ 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1⎟ ⎜ 1 0 1 0 0 0 −1 0 1 0 −1 0 1 0 0 0 −1 0 −1 0⎟ ⎜ 1 −1 1 1 1 −1 −1 −1 1 −1 0 1 −1 1 1 1 −1 −1 −1 1⎟ ⎜ 1 0 0 0 −1 0 1 0 0 0 −1 0 1 0 0 0 −1 0 1 0⎟ ⎜ 1 −1 1 1 −1 −1 −1 −1 1 1 −1 1 0 1 −1 1 1 −1 −1 −1⎟ ⎜ 1 0 1 0 1 0 0 0 1 0 −1 0 1 0 1 0 −1 0 1 0⎟ ⎜ 1 1 0 1 0 0 −1 1 0 0 −1 0 −1 −1 0 1 1 0 1 0⎟ ⎜ 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0⎟ ⎜ 1 1 −1 1 −1 −1 −1 1 1 −1 −1 −1 1 −1 1 1 0 1 1 −1⎟ ⎜ 1 0 0 0 −1 0 1 0 0 0 −1 0 −1 0 0 0 1 0 −1 0⎟ ⎜ 1 −1 −1 1 1 1 1 −1 1 −1 1 −1 −1 −1 −1 1 1 −1 0 1⎟ ⎝ 1 0 −1 0 0 0 −1 0 1 0 1 0 −1 0 0 0 −1 0 1 0⎠
∑(ans)
65