math_fibonacci_generator
Generate Fibonacci sequences, compute the nth term, test if a number is a Fibonacci number, or list Fibonacci values in a range. Exact BigInt results.
Instructions
Fibonacci Sequence Generator. Generate a Fibonacci sequence, compute the nth term via fast doubling, test whether a number is a Fibonacci number, or list every Fibonacci value in a range. The output is fully DETERMINISTIC (same input always yields the same result) and exact via BigInt, with values returned as decimal strings; supports indices up to F(50000) and range bounds up to 10 to the power 200. Use math_prime_number_checker for primality, or math_factorial_calculator for factorials and combinations. Runs locally as pure computation: read-only, non-destructive, contacts no external service, and is rate-limited (60 requests/minute for anonymous callers). Returns a result object whose shape depends on the chosen operation (a values array, an nth value, a membership flag, or a range listing).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | Yes | Which computation to run. sequence lists count terms from start; nth returns the single nth term; isFibonacci tests membership of n; range lists Fibs between from and to. | |
| count | No | Number of terms to emit (operation sequence only). Required for sequence; must be 1 to 2000. | |
| start | No | Zero-based index of the first term emitted (operation sequence only). Optional; defaults to 0; must be 0 to 50000. | |
| n | No | Index for operation nth (0 to 50000), or the value to test for operation isFibonacci (non-negative; very large values may be passed as a numeric string). Required for nth and isFibonacci. | |
| from | No | Inclusive lower value bound (operation range only). Required for range; non-negative and not greater than to. | |
| to | No | Inclusive upper value bound (operation range only). Required for range; non-negative and at most 10 to the power 200. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| success | No | Whether the computation succeeded. | |
| result | No | Operation-specific payload. Fields below are the union across all operations; only the fields for the chosen operation are present. | |
| error | No | Error message when success is false (HTTP 400). |