Quadratic Residue - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Number Theory : Quadratic Residue

NumberTheory

  

QuadraticResidue

  

quadratic residuosity of a number

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

QuadraticResidue(a, n)

Parameters

a

-

integer

n

-

positive integer

Description

• 

The QuadraticResidue(a, n) command returns  if a is a quadratic residue modulo n, and returns  if a is a quadratic non-residue modulo n.

• 

If there exists an integer  such that  is congruent to a modulo n, then a is said to be a quadratic residue modulo n. If there does not exist such a , then a is said to be a quadratic non-residue modulo n.

Examples

Numbers congruent to a perfect square are always quadratic residues. The converse is true as well.

(1)

(2)

(3)

 is a quadratic residue modulo .

(4)

(5)

 is not a quadratic residue modulo .

(6)

(7)

In the following plot, for each row index i and column index j, if the box indexed by i and j is black then j is a quadratic residue modulo i. If the box is white then j is a quadratic non-residue modulo i.

Compatibility

• 

The NumberTheory[QuadraticResidue] command was introduced in Maple 2016.

• 

For more information on Maple 2016 changes, see Updates in Maple 2016.

See Also

NumberTheory

 


Download Help Document