This site is supported by donations to The OEIS Foundation.

# Jacobi symbol

**stub**, please help by expanding it.

The **Jacobi symbol** is a generalization of the Legendre symbol. Given two coprime integers and , with the former the product of primes (not necessarily distinct),^{[1]} the Jacobi symbol is

where is the Legendre symbol. Here are two examples with :

There is no problem with confusing the Legendre and Jacobi symbols; one has a prime for the second argument, the other a composite. In fact, at least one computer algebra system (Wolfram Mathematica) does not offer a separate `LegendreSymbol[a, p]`

command,^{[2]} instead "overloading" `JacobiSymbol[n, m]`

.

However, the notation remains confusing because it looks like a fraction: the examples above could be misunderstood to mean that 2 fifteenths is the same thing as 4 fifteenths and 1, or that 2 forty-fifths is the same thing as 8 forty-fifths and –1.

- ↑ By we're referring to Omega(n), number of prime factors of n (with multiplicity).
- ↑ But one can certainly define it if one feels that strongly about it.