{
  "capability_id": "math.sequences",
  "tool_id": "sequence",
  "engine": "sequence",
  "calculation_version": "1.0.0",
  "generated_at": "2026-09-19T02:14:29.317Z",
  "engine_build": "2026-09-19",
  "test_count": 12,
  "passed": 12,
  "failed": 0,
  "tests_summary": {
    "golden": {
      "total": 4,
      "passed": 4
    },
    "boundary": {
      "total": 2,
      "passed": 2
    },
    "property": {
      "total": 6,
      "passed": 6
    }
  },
  "engine_tested": true,
  "expert_reviewed": false,
  "internally_reviewed": false,
  "review_kind": null,
  "source_checked": true,
  "reviewed_by": null,
  "reviewer_role": null,
  "last_reviewed": null,
  "expert_review": {
    "status": "optional_not_performed",
    "reviewer": null,
    "scope": [
      "formula",
      "input semantics",
      "assumptions",
      "limitations",
      "sources",
      "tests"
    ],
    "note": "Domain expert review is optional under CVP (CVP-EXP-01). Absence does not block CVP Verified. See Review policy for supplemental domain assurance."
  },
  "internal_review": {
    "status": "not_applicable",
    "reviewer": null
  },
  "page": "https://www.calculatorx.com/calc/math/sequence",
  "api": "https://www.calculatorx.com/api/v1/calc/sequence",
  "schema_input": "https://www.calculatorx.com/schemas/math.sequences.input.json",
  "schema_output": "https://www.calculatorx.com/schemas/math.sequences.output.json",
  "assumptions": [
    "Integers",
    "n ≤ 1000",
    "Not Pascal / partition / n!"
  ],
  "limitations": [
    "Not Pascal’s triangle and not integer partition",
    "Not /calc/math/factorial and not /calc/math/permutation-combination",
    "Integers only — no Binet float Fibonacci",
    "Engine id is sequence; never alias the add/sub engine id arithmetic",
    "n=0 on AP/GP → VALUE_MUST_BE_POSITIVE",
    "n>1000 → VALUE_ABOVE_MAX",
    "unknown mode → INVALID_MODE"
  ],
  "boundary_conditions": [
    "unknown mode (including pascal) → INVALID_MODE",
    "n=0 on AP/GP → VALUE_MUST_BE_POSITIVE",
    "n>1000 → VALUE_ABOVE_MAX"
  ],
  "sources": [
    "ISO 80000-2:2019 Quantities and units — Mathematics"
  ],
  "methods": [],
  "fingerprint": "sha256:ac633fb6a40d747074c2c45a941fe716881af18188b8106d6e4ae77635cbed0e",
  "tests": [
    {
      "id": "golden-ap",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "arithmetic",
        "a": 2,
        "d": 3,
        "n": 5
      },
      "expect": {
        "term": 14,
        "sum": 40
      },
      "expectWarning": null,
      "actual": {
        "mode": "arithmetic",
        "n": 5,
        "a": 2,
        "d": 3,
        "term": 14,
        "value": 14,
        "sum": 40,
        "exact": "14",
        "formula": "a_n = a + (n−1)d,  S_n = n/2 · (2a + (n−1)d)",
        "algorithm": "closed_form",
        "max_n": 1000,
        "numeric_domain": "integer",
        "exactness": "exact",
        "numeric_backend": "bigint"
      },
      "tol": null
    },
    {
      "id": "golden-gp",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "geometric",
        "a": 3,
        "r": 2,
        "n": 4
      },
      "expect": {
        "term": 24,
        "sum": 45
      },
      "expectWarning": null,
      "actual": {
        "mode": "geometric",
        "n": 4,
        "a": 3,
        "r": 2,
        "term": 24,
        "value": 24,
        "sum": 45,
        "exact": "24",
        "formula": "a_n = a r^{n−1},  S_n = a(r^n − 1)/(r − 1)",
        "algorithm": "closed_form",
        "max_n": 1000,
        "numeric_domain": "integer",
        "exactness": "exact",
        "numeric_backend": "bigint"
      },
      "tol": null
    },
    {
      "id": "golden-fib-10",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "fibonacci",
        "n": 10
      },
      "expect": {
        "term": 55
      },
      "expectWarning": null,
      "actual": {
        "mode": "fibonacci",
        "n": 10,
        "term": 55,
        "value": 55,
        "sum": 143,
        "exact": "55",
        "prev": 34,
        "convention": "F_0=0, F_1=1",
        "formula": "F_n = F_{n-1} + F_{n-2}",
        "algorithm": "iterative_recurrence",
        "max_n": 1000,
        "numeric_domain": "integer",
        "exactness": "exact",
        "numeric_backend": "bigint"
      },
      "tol": null
    },
    {
      "id": "golden-recurrence-fib",
      "ok": true,
      "kind": "golden",
      "inputs": {
        "mode": "linear_recurrence",
        "p": 1,
        "q": 1,
        "a0": 0,
        "a1": 1,
        "n": 10
      },
      "expect": {
        "term": 55
      },
      "expectWarning": null,
      "actual": {
        "mode": "linear_recurrence",
        "n": 10,
        "p": 1,
        "q": 1,
        "a0": 0,
        "a1": 1,
        "term": 55,
        "value": 55,
        "exact": "55",
        "formula": "u_n = p·u_{n-1} + q·u_{n-2}",
        "algorithm": "iterative_recurrence",
        "max_n": 1000,
        "numeric_domain": "integer",
        "exactness": "exact",
        "numeric_backend": "bigint"
      },
      "tol": null
    },
    {
      "id": "boundary-seq-pascal",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "pascal",
        "n": 5
      },
      "expectError": "INVALID_MODE",
      "code": "INVALID_MODE",
      "error": "mode must be arithmetic, geometric, fibonacci, or linear_recurrence."
    },
    {
      "id": "boundary-ap-n0",
      "ok": true,
      "kind": "boundary",
      "inputs": {
        "mode": "arithmetic",
        "a": 1,
        "d": 1,
        "n": 0
      },
      "expectError": "VALUE_MUST_BE_POSITIVE",
      "code": "VALUE_MUST_BE_POSITIVE",
      "error": "n must be ≥ 1."
    },
    {
      "id": "property-ap-term",
      "ok": true,
      "kind": "property",
      "detail": "a_5=14",
      "expect": 14,
      "actual": 14
    },
    {
      "id": "property-ap-sum",
      "ok": true,
      "kind": "property",
      "detail": "S_5=40",
      "expect": 40,
      "actual": 40
    },
    {
      "id": "property-gp-term",
      "ok": true,
      "kind": "property",
      "detail": "a_4=24",
      "expect": 24,
      "actual": 24
    },
    {
      "id": "property-fib-10",
      "ok": true,
      "kind": "property",
      "detail": "F_10=55",
      "expect": 55,
      "actual": 55
    },
    {
      "id": "property-rec-fib",
      "ok": true,
      "kind": "property",
      "detail": "recurrence matches F_10",
      "expect": 55,
      "actual": 55
    },
    {
      "id": "property-fib-0",
      "ok": true,
      "kind": "property",
      "detail": "F_0=0",
      "expect": 0,
      "actual": 0
    }
  ],
  "tier": "engine_tested",
  "verification": {
    "tests": {
      "passed": 12,
      "total": 12,
      "golden": 4,
      "boundary": 2,
      "property": 6
    },
    "contract_checks": {
      "passed": 4,
      "total": 4
    }
  },
  "evidence_core_generated_at": "2026-09-19T01:08:38.526Z",
  "rendered_at": "2026-09-19T02:14:29.317Z",
  "release_integrity": {
    "status": "verified",
    "scope": "workspace",
    "production_attestation_required": true,
    "calculation_version": "1.0.0",
    "artifacts": {
      "engine": "1.0.0",
      "page": "1.0.0",
      "capability": "1.0.0",
      "evidence": "1.0.0",
      "input_schema": "1.0.0",
      "output_schema": "1.0.0",
      "mcp_contract": "1.0.0"
    },
    "digests": {
      "input_schema_sha256": "f4bec45ebd1ac51417827dbf207258b1f2ccd72527597c58159b524c703e14a7",
      "output_schema_sha256": "01c274ed03ed17ad714cbc73df6bebd2b0870b9cfd46b35fac7435fc90e62232",
      "evidence_sha256": "9ede0f3ab38bdb32599896110bd07a79b3be6b0675a0d80032d5cf67df802c76",
      "evidence_core_sha256": "9ede0f3ab38bdb32599896110bd07a79b3be6b0675a0d80032d5cf67df802c76",
      "capability_sha256": "745b13ae89b5ad507564d1ff379ac20d6dd7df56ade0b3fa6ebcd4405dff51ea",
      "engine_sha256": "e2db0a7325e87d733eee5491a146d870677fe7b2ccb5d15ba36a8b5afbb17247",
      "mcp_contract_sha256": "312c860acede70764ad49c5e6180292fe8086ed8874884b9239465a80766d858"
    },
    "contract_checks": {
      "total": 4,
      "passed": 4,
      "failed": 0,
      "items": [
        {
          "id": "release-artifacts-aligned",
          "status": "pass",
          "detail": "1.0.0"
        },
        {
          "id": "schema-valid-input-executes",
          "status": "pass"
        },
        {
          "id": "engine-success-output-validates-schema",
          "status": "pass"
        },
        {
          "id": "schema-rejects-incomplete-input",
          "status": "pass"
        }
      ]
    },
    "report": "https://www.calculatorx.com/.well-known/calculatorx-release-integrity.json"
  }
}
