{
  "tool": "matric-nqf4.maths_geometric_sequence",
  "name": "Geometric sequence and series (CDU-GEN-NSC-400)",
  "answers": "Tₙ = arⁿ⁻¹ and Sₙ = a(rⁿ − 1)/(r − 1), refusing r = 1 where the formula is undefined.",
  "degree": {
    "id": "competency:matric-nqf4",
    "code": "CDU-GEN-NSC-400",
    "name": "Senior Certificate (Amended) — exam-readiness programme (NQF 4 matric)",
    "version": "1.0.0"
  },
  "reference": "CAPS Grade 12 Mathematics, worked reference M6 (offline reconstruction); Tₙ = arⁿ⁻¹; Sₙ = a(rⁿ − 1)/(r − 1), r ≠ 1",
  "endpoint": "/faculty/matric-nqf4/maths_geometric_sequence",
  "feeSt": 1,
  "inputSchema": {
    "type": "object",
    "required": [
      "pan",
      "a",
      "r",
      "n"
    ],
    "properties": {
      "pan": {
        "type": "string",
        "description": "The student PAN — the degree must be held in one of its five slots",
        "pattern": "^[0-9 ]{16,19}$"
      },
      "a": {
        "type": "number",
        "description": "first term",
        "minimum": -10000,
        "maximum": 10000
      },
      "r": {
        "type": "number",
        "description": "common ratio (r ≠ 1 for the Sₙ formula)",
        "minimum": -100,
        "maximum": 100
      },
      "n": {
        "type": "number",
        "description": "term number (positive integer)",
        "maximum": 60
      }
    },
    "additionalProperties": false
  },
  "outputSchema": {
    "type": "object",
    "required": [
      "tn",
      "sn"
    ],
    "properties": {
      "tn": {
        "type": "number",
        "description": "the nth term"
      },
      "sn": {
        "type": "number",
        "description": "the sum of the first n terms"
      }
    },
    "additionalProperties": false
  },
  "example": {
    "a": 2,
    "r": 3,
    "n": 5
  }
}