wilson_theorem_test
Test if an integer is prime using Wilson's theorem: (n-1)! ≡ -1 (mod n) for prime numbers. Enter an integer to verify its primality.
Instructions
Test primality using Wilson's theorem: (n-1)! ≡ -1 (mod n) iff n is prime. (Domain: arithmetic, Category: wilson_theorem)
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": {
"n": "<n>"
},
"name": "wilson_theorem_test"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | Yes |