# Lucas number

`lucas-number` · version 1.0.0 · Numbers & math · free, no key needed

Compute the Lucas number at a zero-based index and return its exact decimal string.

**Use when you need to: lucas number 90 · compute nth lucas number · exact lucas sequence value.**

## Decide before calling

Read the [versioned contract](/v1/tools/lucas-number/versions/1.0.0) and the supported scope below. Reuse `lucas-number@1.0.0` when your input, required output and limits match it. Choose another approach for an unsupported operation.

## Explain the choice

"I can use `lucas-number@1.0.0` for lucas number 90. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."

## Supported

- lucas number 90
- compute nth lucas number
- exact lucas sequence value
- lucas number at index
- calculate lucas without rounding
- what is the 100th lucas number
- zero based lucas lookup

## Not supported

- negative-index sequence extensions
- floating-point approximations
- unbounded sequence generation

## Behavior

- L(0)=2, L(1)=1, and L(n)=L(n-1)+L(n-2).
- The index is zero-based and the result is an unsigned base-10 string.
- Standard version: OEIS A000032 (live entry retrieved 2026-11-05; NAME, initial terms, OFFSET 0,1); stable source URL: https://oeis.org/A000032.

## Input

- `index` (integer, required): min 0; max 10000

## Output

- `index` (integer, required): min 0; max 10000
- `value` (string, required): min length 1; max length 2091; pattern `^[0-9]+$`
- `standard_version` (string, required): min length 1; max length 120

## Limits

- max input bytes: 64
- max index: 10000
- max digits: 2091
- max iterations: 14
- max output bytes: 2300

## Example

Request input:

```json
{
  "index": 10
}
```

Response:

```json
{
  "result": {
    "index": 10,
    "value": "123",
    "standard_version": "OEIS A000032 (live entry retrieved 2026-11-05; NAME, initial terms, OFFSET 0,1)"
  }
}
```

## How to call it

### MCP

Connect `https://computefirst.net/mcp` ([setup](/docs#connect)), then call `execute` with:

```json
{
  "id": "lucas-number",
  "version": "1.0.0",
  "input": {
    "index": 10
  }
}
```

### HTTP (no key)

```sh
curl -X POST https://computefirst.net/v1/tools/lucas-number/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"index":10}'
```

The machine-readable contract is at [/v1/tools/lucas-number/versions/1.0.0](/v1/tools/lucas-number/versions/1.0.0).

### CLI

```sh
node cli.mjs run lucas-number 1.0.0 --input input.json --base-url https://computefirst.net
```

Get the client at [/clients/cli/](/clients/cli/).

## Related tools

- [Fibonacci number](/tools/fibonacci-number): Compute the Fibonacci number at a zero-based index and return its exact decimal string.
- [Unit result check](/tools/unit-result-check): Check a claimed converted value exactly or under declared rounding; returns the exact value and the claim error
- [Chromatic certificate check](/tools/chromatic-certificate-check): Check a claim chi(G) = k: a proper k-colouring plus a clique or bounded exhaustive proof; returns the first discrepancy.
- [Classification metrics compute](/tools/classification-metrics-compute): Compute exact binary-classification metrics from integer confusion-matrix counts as reduced fractions or null.
- [Linear residual check](/tools/linear-residual-check): Check a claimed residual r = b - A x (per component and/or its max norm) exactly for an approximate solution x.
- [Network flow feasibility check](/tools/network-flow-feasibility-check): Check a claimed s-t flow for capacity bounds and conservation with exact integers; returns the first bad edge or node.
