galois.kronecker_symbol

galois.kronecker_symbol(a: int, n: int) int

Computes the Kronecker symbol \((\frac{a}{n})\).

The Kronecker symbol extends the Jacobi symbol for all \(n\).

Parameters
a

An integer.

n

An integer.

Returns

The Kronecker symbol \((\frac{a}{n})\) with value in \(\{0, -1, 1\}\).

References


Last update: May 18, 2022