numtheory(deprecated)/quadres - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : numtheory(deprecated)/quadres

numtheory(deprecated)

  

quadres

  

check if a number is a quadratic residue mod another

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

quadres(a, b)

Parameters

a, b

-

integer

Description

• 

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.

Examples

Important: The numtheory package has been deprecated.  Use the superseding command NumberTheory[QuadraticResidue] instead.

> 

with⁡numtheory:

> 

quadres⁡74,101

−1

(1)
> 

quadres⁡0,73

1

(2)
> 

quadres⁡22,11

1

(3)
> 

quadres⁡5,256

−1

(4)
> 

quadres⁡−2342,1904

−1

(5)

See Also

NumberTheory[QuadraticResidue]

numtheory(deprecated)[jacobi]

numtheory(deprecated)[legendre]