Collatz conjecture calculator (3n + 1)
hopi_collatz_conjecture_calculatorRun the Collatz (3n + 1) rule on a positive whole number of up to 1,000 digits: halve it when even, treble it and add 1 when odd, until it reaches 1. Returns the total steps, odd and even step counts, the highest value reached and the step it was reached at, and the path itself (first 1,000 values; pathTruncated says whether it was cut). Exact for any size: n, peak and the path values are decimal strings. Pass big numbers as a digit string, because JSON numbers above 9,007,199,254,740,991 lose precision. Source: https://hopi.co.uk/collatz-conjecture-calculator/
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": "hopi_collatz_conjecture_calculator"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | Yes | Starting number: a positive whole number of up to 1,000 digits, as a digit string such as "27" or "837799" (a plain JSON number also works up to 9,007,199,254,740,991) | 27 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | ||
| path | No | ||
| peak | No | ||
| steps | No | ||
| summary | Yes | ||
| oddSteps | No | ||
| peakStep | No | ||
| evenSteps | No | ||
| source_url | Yes | The tool's page on hopi.co.uk (cite or open to check the figure) | |
| pathTruncated | No |