Skip to content

JacobiSymbol

JacobiSymbol(m, n)

calculates the Jacobi symbol.

See

Examples

>> JacobiSymbol(1001, 9907)
-1

The JacobiSymbol(a, n) is a generalization of the Legendre symbol that allows for a composite second (bottom) argument n, although n must still be odd and positive.

>> JacobiSymbol(12345, 331)
-1

Implementation status

  • ☑ - partially implemented

Github