// Numbas version: exam_results_page_options {"name": "Finding the $n^{\\text{th}}$ Term of a Quadratic Sequence", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"tags": [], "statement": "", "variable_groups": [], "ungrouped_variables": ["a", "c", "b", "sequence", "first_difference"], "variables": {"sequence": {"group": "Ungrouped variables", "description": "", "definition": "map(a*n^2+b*n+c,n,0..5)", "name": "sequence", "templateType": "anything"}, "c": {"group": "Ungrouped variables", "description": "", "definition": "random(3..13 except 10)", "name": "c", "templateType": "anything"}, "a": {"group": "Ungrouped variables", "description": "", "definition": "random(2..4)", "name": "a", "templateType": "anything"}, "b": {"group": "Ungrouped variables", "description": "", "definition": "random(1..4)", "name": "b", "templateType": "anything"}, "first_difference": {"group": "Ungrouped variables", "description": "", "definition": "map(a*(2n+1)+b,n,0..5)", "name": "first_difference", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "preamble": {"css": "#sequence-table tr:nth-child(2n+2) td,\n#sequence-table tr:nth-child(2n+2) th {\n border-top: 1px solid;\n border-bottom: 1px dashed #ccc;\n}\n\n#sequence-table tr > *:nth-child(2) {\n border-right: 1px solid;\n}\n#sequence-table th {\n text-align: center;\n}\n#sequence-table td {\n padding-left: 1.2em;\n}", "js": ""}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Given the first four terms of a quadratic sequence, write down the formula for the $n^\\text{th}$ term.

"}, "parts": [{"variableReplacementStrategy": "originalfirst", "unitTests": [], "marks": 0, "customMarkingAlgorithm": "", "customName": "", "prompt": "

Find the formula for the $n^\\text{th}$ term of the quadratic sequence

\n

$\\var{a*1^2+b*1+c}, \\var{a*2^2+b*2+c}, \\var{a*3^2+b*3+c}, \\var{a*4^2+b*4+c}, \\ldots$

\n

$a_n = $ [[0]]

\n

", "showCorrectAnswer": true, "sortAnswers": false, "gaps": [{"failureRate": 1, "variableReplacementStrategy": "originalfirst", "unitTests": [], "marks": 1, "customMarkingAlgorithm": "", "vsetRangePoints": 5, "customName": "", "answer": "{a}*n^2+{b}*n+{c}", "showCorrectAnswer": true, "checkingAccuracy": 0.001, "checkVariableNames": false, "checkingType": "absdiff", "extendBaseMarkingAlgorithm": true, "type": "jme", "vsetRange": [0, 1], "useCustomName": false, "showFeedbackIcon": true, "showPreview": true, "valuegenerators": [{"value": "", "name": "n"}], "variableReplacements": [], "scripts": {}}], "extendBaseMarkingAlgorithm": true, "type": "gapfill", "useCustomName": false, "showFeedbackIcon": true, "variableReplacements": [], "scripts": {}}], "advice": "

A quadratic sequence is a sequence in which the $n^\\text{th}$ term takes the form $an^2+bn+c$.

\n

Unlike an arithmetic sequence, a quadratic sequence does not have a constant common difference, but instead has differences which increase or decrease by a constant value. That is, the second differences are constant.

\n

An easy way of determining the constants $a$, $b$ and $c$ is to draw up a table of $n$, $a_n$, and the first and second differences between terms.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$n$$1$$2$$3$$4$
$a_n$Algebraic form$a+b+c$$4a+2b+c$$9a+3b+c$$16a+4b+c$
Numerical form$\\var{sequence[1]}$$\\var{sequence[2]}$$\\var{sequence[3]}$$\\var{sequence[4]}$
First differenceAlgebraic form$3a+b$$5a+b$$7a+b$
Numerical form$\\var{first_difference[1]}$$\\var{first_difference[2]}$$\\var{first_difference[3]}$
Second differenceAlgebraic form$2a$$2a$
Numerical form$\\var{2a}$$\\var{2a}$
\n

In this table, the algebraic forms for $a_n$ have been found by substituting $n$ into the formula. The first and second differences are found by subtracting adjacent entries in the row above.

\n

We can see straight away that the second difference is always $2a = \\var{2a}$, so $a = \\var{a}$.

\n

Next, we can substitute the value of $a$ into the algebraic form of one of the first differences, and rearrange to find $b$.

\n

\\begin{align}
3 \\times \\var{a} + b &= \\var{3*a+b} \\\\
\\var{3a} + b &= \\var{3a+b} \\\\
b &= \\var{b} \\text{.}
\\end{align}

\n

Finally, substitute $a$ and $b$ into the algebraic form for any of the $a_n$ ($a_1$ is simplest) to find $c$.

\n

\\begin{align}
\\var{a} + \\var{b} + c &= \\var{a+b+c} \\\\
c &= \\var{c} \\text{.}
\\end{align}

\n

Now we can write down the general formula for $a_n$.

\n

\\[a_n = \\simplify{{a}n^2+{b}n+{c}} \\text{.}\\]

\n

", "functions": {}, "rulesets": {}, "extensions": [], "name": "Finding the $n^{\\text{th}}$ Term of a Quadratic Sequence", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Aiden McCall", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1592/"}, {"name": "Hannah Aldous", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1594/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Aiden McCall", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1592/"}, {"name": "Hannah Aldous", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1594/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}