numtheory(deprecated)
quadres
check if a number is a quadratic residue mod another
Calling Sequence
Parameters
Description
Examples
quadres(a, b)
a, b
-
integer
Important: The numtheory package has been deprecated. Use the superseding command NumberTheory[QuadraticResidue] instead.
The function quadres will compute a generalized Legendre symbol L⁡ab of a and b, which is defined to be 1 if a is a quadratic residue mod⁢band -1 if a is a quadratic non-residue mod⁢p. The number a is a quadratic residue mod b if it has a square root mod⁢b; i.e., an integer c exists such that c2 is congruent to a⁢mod⁢b.
The command with(numtheory,quadres) allows the use of the abbreviated form of this command.
with⁡numtheory:
quadres⁡74,101
−1
quadres⁡0,73
1
quadres⁡22,11
quadres⁡5,256
quadres⁡−2342,1904
See Also
NumberTheory[QuadraticResidue]
numtheory(deprecated)[jacobi]
numtheory(deprecated)[legendre]
Download Help Document