# jacobi_symbol 函数

Jacobi 符号 (a/n)，其中 n 为奇正数。

## 怎么写

### jacobi_symbol(a, n)

**a**

上面的数。接受一个整数。

**n**

一个奇的整数。接受一个整数。

## 示例

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

  `jacobi_symbol(2, 7)`

  在求解器中，`jacobi_symbol(2, 7)` 的结果是 `1`。

  [在求解器中打开](https://zh.hilberon.com/?q=jacobi_symbol%282%2C%207%29)

## 相关函数

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

  第 n 个卢卡斯数。
- [is_square_free](https://zh.hilberon.com/library/is_square_free)

  检验是否没有大于 1 的平方数整除一个整数。
- [modular_inverse](https://zh.hilberon.com/library/modular_inverse)

  一个整数在模另一个数下的逆元。
- [is_prime_power](https://zh.hilberon.com/library/is_prime_power)

  检验一个整数是否为素数的幂。
- [moebius_mu](https://zh.hilberon.com/library/moebius_mu)

  莫比乌斯函数：若某个平方数整除 n 则为 0，否则根据其质因数个数的奇偶性为 1 或 -1。
- [is_prime](https://zh.hilberon.com/library/is_prime)

  检验一个整数是否为素数。

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