numtheory(deprecated)/legendre - 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)/legendre

numtheory(deprecated)

  

legendre

  

Legendre symbol

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

legendre(a, p)

Parameters

a

-

integer

p

-

prime

Description

• 

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

• 

The legendre(a, p) function computes the Legendre symbol L⁡ap of a and p, which is defined to be 1 if a is a quadratic residue mod⁢p, −1 if a is a quadratic non-residue mod⁢p, and 0 if a is congruent to 0⁢mod⁢p. The number a is a quadratic residue mod p if it is not a multiple of p and has a square root mod⁢p, that is, there is an integer c such that c2 is congruent to a⁢mod⁢p. The number a is a quadratic non-residue mod p if it is not a multiple of p and does not have a square root mod⁢p.

  

Note: The legendre routine returns unevaluated if the given algebraic arguments are not of the types specified above.

• 

The command with(numtheory,legendre) allows the use of the abbreviated form of this command.

Examples

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

> 

with⁡numtheory:

> 

legendre⁡74,101

−1

(1)
> 

legendre⁡3,73

1

(2)
> 

legendre⁡22,11

0

(3)
> 

legendre⁡5,2

−1

(4)
> 

legendre⁡−2342,1901

1

(5)
> 

legendre⁡a,p

legendre⁡a,p

(6)

See Also

mod

NumberTheory[LegendreSymbol]

numtheory(deprecated)[jacobi]

numtheory(deprecated)[quadres]