legendre
Compute the Legendre symbol (a/p) to determine if integer a is a quadratic residue modulo odd prime p.
Instructions
Compute the Legendre symbol (a/p).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"a": "<a>",
"p": "<p>"
},
"name": "legendre"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | Integer. | |
| p | Yes | Odd prime. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |