Legendre symbol - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Group Theory : Number Theory : numtheory/legendre

numtheory[legendre] - Legendre symbol

Calling Sequence

legendre(a, p)

Parameters

a

-

integer

p

-

prime

Description

• 

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

withnumtheory:

legendre74,101

1

(1)

legendre3,73

1

(2)

legendre22,11

0

(3)

legendre5,2

1

(4)

legendre2342,1901

1

(5)

legendrea,p

numtheory:-legendrea,p

(6)

See Also

mod, numtheory[jacobi], numtheory[quadres]


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam