Josephus K2
josephus_k2The Josephus survivor when every 2nd person is eliminated. Write n = 2^m + l with l < 2^m. The survivor is 2*l + 1. 5 gives 3, 10 gives 5, and 41 gives 19. n runs from 1 to 1000000. Price: $0.001 USDC per successful call (x402, Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/josephus-k2
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": "josephus_k2"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | Yes |