{
  "tool": "matric-nqf4.maths_arithmetic_sequence",
  "name": "Arithmetic sequence and series (CDU-GEN-NSC-400)",
  "answers": "Tₙ = a + (n − 1)d and Sₙ = n/2 [2a + (n − 1)d], with the Sₙ = n/2 (a + l) cross-check.",
  "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 M5 (offline reconstruction); Tₙ = a + (n − 1)d; Sₙ = n/2 [2a + (n − 1)d]",
  "endpoint": "/faculty/matric-nqf4/maths_arithmetic_sequence",
  "feeSt": 1,
  "inputSchema": {
    "type": "object",
    "required": [
      "pan",
      "a",
      "d",
      "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
      },
      "d": {
        "type": "number",
        "description": "common difference",
        "minimum": -1000,
        "maximum": 1000
      },
      "n": {
        "type": "number",
        "description": "term number (positive integer)",
        "maximum": 100000
      }
    },
    "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": 4,
    "d": 3,
    "n": 20
  }
}