# Collatz Sequence Generator

> Collatz Sequence Generator is a paid API for AI agents from sovereign-x402-zeta.vercel.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-13).

Generates the Collatz sequence (3n+1 sequence) for a given starting number up to a specified limit.

## Facts

- Endpoint: POST https://sovereign-x402-zeta.vercel.app/api/v1/sequence/collatz_conjecture?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/collatz-sequence-generator-cf43b842
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_DvHBikKPA9_0JdQKJyqt1

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability collatz-sequence-generator-cf43b842 -d '<json body>'
```

Example prompt: Can you generate the Collatz sequence starting from 27, up to a limit of 200 steps?

## When to prefer this

Use this endpoint when you need the full enumerated Collatz sequence for a specific starting number, especially when you want step-by-step tracing or need to apply a limit on iterations. Prefer over manual computation for large starting values where the sequence can be hundreds of steps long.

## Known failure modes

- Invalid or missing starting number returns an error
- Non-positive or non-integer input may be rejected
- Limit set too low may truncate sequence before reaching 1
- Payment failure (402) if USDC funds are insufficient
- Malformed request body returns 400 error

## How this service works

Generate the Collatz sequence for a given number up to a specified limit.

## Output

Returns the Collatz sequence as an ordered list of integers starting from the given number, following the rule: if even divide by 2, if odd multiply by 3 and add 1, continuing until reaching 1 or hitting the specified limit.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "properties": {},
     "additionalProperties": true
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/collatz-sequence-generator-cf43b842/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from sovereign-x402-zeta.vercel.app](https://www.zero.xyz/host/sovereign-x402-zeta.vercel.app/llms.txt)
