// Numbas version: exam_results_page_options {"name": "Compute the partial sum of an arithmetic sequence", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"metadata": {"description": "

Given the first and last terms of a finite arithmetic sequence, calculate the number of elements and then the sum of the sequence.

\n

Each part is broken into steps, with the formula given.

", "licence": "Creative Commons Attribution 4.0 International"}, "ungrouped_variables": ["m", "first_index", "last_index", "num_terms", "first_term", "last_term", "partial_sum"], "type": "question", "rulesets": {}, "advice": "

We are given the arithmetic sequence

\n

\$\\var{m*first_index}, \\var{m*(first_index+1)}, \\var{m*(first_index+1)}, \\ldots, \\var{last_term} \\text{.} \$

\n

#### a)

\n

Let $n$ be the number of terms in the sequence. Then $a_n = \\var{last_term}$.

\n

To find $n$, we must rearrange the formula for the $n^\\text{th}$ term

\n

\$a_n=a_1+(n-1)d\\text{.}\$

\n

The first term is $a_1 = \\var{first_term}$ and the common difference is $d = \\var{first_term+m} - \\var{first_term} = \\var{m}$.

\n

So we have

\n

\\begin{align}
d&=\\var{m} \\text{,} \\\\
a_1&= \\var{first_term} \\text{,} \\\\
a_n&=\\var{last_term} \\text{.}
\\end{align}

\n

We now substitute these values into the formula for the $n^\\text{th}$ term and rearrange to find $n$.

\n

\\begin{align}
\\var{last_term}&=\\var{first_term}+\\var{m}(n-1) \\\\
\\var{last_term}-\\var{first_term}&=\\var{m}(n-1) \\\\
\\frac{\\var{last_term-first_term}}{\\var{m}}&=(n-1) \\\\
n&=\\var{(last_term-first_term)/m}+1 = \\var{num_terms}\\text{.}
\\end{align}

\n

#### b)

\n

The partial sum of the first $n$ terms of an arithmetic sequence is given by

\n

\$\\sum\\limits_{i=1}^n{a_i}=\\frac{n}{2}(a_1+a_n)\\text{.}\$

\n

We know from part a) that

\n

\\begin{align}
n&= \\var{num_terms} \\text{,} \\\\
a_1&= \\var{first_term} \\text{,} \\\\
a_n&= \\var{last_term} \\text{.}
\\end{align}

\n

We substitute these values into the formula, obtaining

\n

\\begin{align}
\\sum\\limits_{i=1}^n{a_i}&=\\frac{n}{2}(a_1+a_n)\\\\
&= \\frac{\\var{num_terms}}{2}(\\var{first_term}+\\var{last_term})\\\\
&= \\simplify[]{ ({num_terms}*({first_term+last_term}))/2} \\\\
&= \\var{partial_sum} \\text{.}
\\end{align}

", "variables": {"last_index": {"description": "

The sequence shown is a subsequence of the infinite sequence $a_i = m \\times i$.

\n

This is the index of the last term shown.

", "definition": "first_index+num_terms-1", "group": "Ungrouped variables", "name": "last_index", "templateType": "anything"}, "m": {"description": "

Common difference between terms

", "definition": "random(2..10)", "group": "Ungrouped variables", "name": "m", "templateType": "anything"}, "first_index": {"description": "

The sequence shown is a subsequence of the infinite sequence $a_i = m \\times i$.

\n

This is the index of the first term shown.

", "definition": "random(6..14)", "group": "Ungrouped variables", "name": "first_index", "templateType": "anything"}, "num_terms": {"description": "

The number of terms in the sequence.

", "definition": "random(11..30)", "group": "Ungrouped variables", "name": "num_terms", "templateType": "anything"}, "partial_sum": {"description": "

Sum of the terms in the sequence.

", "definition": "num_terms*(first_term+last_term)/2", "group": "Ungrouped variables", "name": "partial_sum", "templateType": "anything"}, "first_term": {"description": "

The first term in the sequence.

", "definition": "m*first_index", "group": "Ungrouped variables", "name": "first_term", "templateType": "anything"}, "last_term": {"description": "

The last term in the sequence.

", "definition": "m*last_index", "group": "Ungrouped variables", "name": "last_term", "templateType": "anything"}}, "statement": "

You are given the following arithmetic sequence:

\n

\$\\var{m*first_index}, \\var{m*(first_index+1)}, \\var{m*(first_index+2)}, \\ldots, \\var{last_term}.\$

", "name": "Compute the partial sum of an arithmetic sequence", "parts": [{"scripts": {}, "steps": [{"scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "information", "showCorrectAnswer": true, "marks": 0, "variableReplacements": [], "showFeedbackIcon": true, "prompt": "

The formula for the $n^\\text{th}$ term in an arithmetic sequence is

\n

\$a_n=a_1+(n-1)d\\text{,}\$

\n

where

\n
\n
• $d$ is the common difference between consecutive terms;
• \n
• $a_1$ is the first term in the sequence;
• \n
• $a_n$ is the $n^\\text{th}$ term in the sequence.
• \n
"}, {"correctAnswerFraction": false, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "prompt": "

For this arithmetic sequence, what is the value of $a_1$?

", "showFeedbackIcon": true, "allowFractions": false, "minValue": "first_term", "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "maxValue": "first_term", "mustBeReduced": false, "marks": "0.2", "variableReplacements": [], "correctAnswerStyle": "plain", "showCorrectAnswer": true}, {"correctAnswerFraction": false, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "prompt": "

What is the value of $d$?

", "showFeedbackIcon": true, "allowFractions": false, "minValue": "m", "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "maxValue": "m", "mustBeReduced": false, "marks": "0.2", "variableReplacements": [], "correctAnswerStyle": "plain", "showCorrectAnswer": true}], "type": "gapfill", "variableReplacements": [], "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "gaps": [{"correctAnswerFraction": false, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "allowFractions": false, "minValue": "num_terms", "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "maxValue": "num_terms", "mustBeReduced": false, "marks": 1, "variableReplacements": [], "correctAnswerStyle": "plain", "showCorrectAnswer": true}], "showFeedbackIcon": true, "marks": 0, "prompt": "

How many terms are there in this sequence?

\n

$n =$ [[0]]

", "stepsPenalty": 0}, {"scripts": {}, "steps": [{"scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "information", "showCorrectAnswer": true, "marks": 0, "variableReplacements": [], "showFeedbackIcon": true, "prompt": "

The sum of an arithmetic sequence $a_1, a_2, \\ldots, a_n$ is calculated using the formula

\n

\$\\sum\\limits_{i=1}^n{a_i}=\\frac{n}{2}(a_1+a_n) \$

\n

where

\n
\n
• $a_1$ is the first term;
• \n
• $a_n$ is the $n^{th}$ term;
• \n
• $n$ is the number of terms.
• \n
"}], "type": "gapfill", "variableReplacements": [], "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "gaps": [{"correctAnswerFraction": false, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "showFeedbackIcon": true, "allowFractions": false, "minValue": "partial_sum", "scripts": {}, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "maxValue": "partial_sum", "mustBeReduced": false, "marks": "2", "variableReplacements": [], "correctAnswerStyle": "plain", "showCorrectAnswer": true}], "showFeedbackIcon": true, "marks": 0, "prompt": "

Find the sum of the sequence up to and including the term $\\var{last_term}$.

\n

[[0]]

", "stepsPenalty": 0}], "tags": ["arithmetic sequences", "Arithmetic sequences", "Arithmetic Sequences", "common difference", "partial sums", "sequences", "taxonomy", "term number"], "preamble": {"js": "", "css": ""}, "variable_groups": [], "functions": {}, "extensions": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Hannah Aldous", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1594/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Hannah Aldous", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1594/"}]}