# jacobi_symbol function

Jacobi symbol (a/n), for an odd positive n.

## How to write it

### jacobi_symbol(a, n)

**a**

The top number. Takes a whole number.

**n**

An odd positive whole number. Takes a whole number.

## Examples

- $\displaystyle \operatorname{jacobi\_symbol}(2, 7) = 1$

  `jacobi_symbol(2, 7)`

  In the solver, `jacobi_symbol(2, 7)` gives `1`.

  [Open in the solver](https://hilberon.com/?q=jacobi_symbol%282%2C%207%29)

## Related functions

- [lucas_l](https://hilberon.com/library/lucas_l)

  The n-th Lucas number.
- [is_square_free](https://hilberon.com/library/is_square_free)

  Test whether no square greater than 1 divides a whole number.
- [modular_inverse](https://hilberon.com/library/modular_inverse)

  The inverse of a whole number modulo another.
- [is_prime_power](https://hilberon.com/library/is_prime_power)

  Test whether a whole number is a power of a prime.
- [moebius_mu](https://hilberon.com/library/moebius_mu)

  Moebius function: 0 if a square divides n, else 1 or -1 by the parity of its prime factors.
- [is_prime](https://hilberon.com/library/is_prime)

  Test whether a whole number is prime.

---
Source: https://hilberon.com/library/jacobi_symbol
