Talk:Jacobi symbol: Difference between revisions

From Rosetta Code
Content added Content deleted
(→‎Lead rewrite: new section)
 
Line 4: Line 4:


--[[User:DavidFashion|DavidFashion]] ([[User talk:DavidFashion|talk]]) 22:55, 5 February 2020 (UTC)
--[[User:DavidFashion|DavidFashion]] ([[User talk:DavidFashion|talk]]) 22:55, 5 February 2020 (UTC)

== Lead rewrite ==

I rewrote the lead to use LaTeX, but Mathoid wasn't working when I tried to preview it, so I'm dumping it here so that I don't lose it. Disregard the errors if it doesn't re-render by the time you see this. -[[User:Happy5214|happy]][[User talk:Happy5214|5214]] 06:22, 6 February 2020 (UTC)

---------

The '''Jacobi symbol''' is a multiplicative function that generalizes the Legendre symbol. Specifically, the Jacobi symbol <math>\left(\frac{a}{n}\right)</math> equals the product of the Legendre symbols <math>\left(\frac{a}{p_i}\right)^{k_i}</math>, where <math>n = p_1^{k_1}p_2^{k_2}\cdots p_i^{k_i}</math> is the prime factorization of <math>n</math> and the Legendre symbol <math>\left(\frac{a}{p}\right)</math> denotes the value of <math>a^{(p-1)/2} \pmod{p} = \begin{cases}
1 & \text{if a is a square} \pmod{p} \\
-1 & \text{if a is not a square} \pmod{p} \\
0 & \text{if } a \equiv 0 \pmod{p}
\end{cases}</math>

If n is prime, then the Jacobi symbol <math>\left(\frac{a}{n}\right)</math> equals the Legendre symbol <math>\left(\frac{a}{n}\right)</math>.

;Task:
Calculate the Jacobi symbol <math>\left(\frac{a}{n}\right)</math>.

Latest revision as of 06:22, 6 February 2020

Promote to Task

This task is well defined and has many implementation. Any objection to promoting this draft task to a task?

--DavidFashion (talk) 22:55, 5 February 2020 (UTC)

Lead rewrite

I rewrote the lead to use LaTeX, but Mathoid wasn't working when I tried to preview it, so I'm dumping it here so that I don't lose it. Disregard the errors if it doesn't re-render by the time you see this. -happy5214 06:22, 6 February 2020 (UTC)


The Jacobi symbol is a multiplicative function that generalizes the Legendre symbol. Specifically, the Jacobi symbol equals the product of the Legendre symbols , where is the prime factorization of and the Legendre symbol denotes the value of

If n is prime, then the Jacobi symbol equals the Legendre symbol .

Task

Calculate the Jacobi symbol .