numtheory(deprecated)/legendre - Maple Help

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 Lap of a and p, which is defined to be 1 if a is a quadratic residue modp, −1 if a is a quadratic non-residue modp, and 0 if a is congruent to 0modp. The number a is a quadratic residue mod p if it is not a multiple of p and has a square root modp, that is, there is an integer c such that c2 is congruent to amodp. 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 modp.

  

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.

withnumtheory:

legendre74,101

−1

(1)

legendre3,73

1

(2)

legendre22,11

0

(3)

legendre5,2

−1

(4)

legendre2342,1901

1

(5)

legendrea,p

legendrea,p

(6)

See Also

mod

NumberTheory[LegendreSymbol]

numtheory(deprecated)[jacobi]

numtheory(deprecated)[quadres]