// Numbas version: exam_results_page_options {"name": "Partial sum of an arithmetic sequence - birthday money", "extensions": ["random_person"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [{"variables": ["person", "pronouns"], "name": "A person"}], "extensions": ["random_person"], "name": "Partial sum of an arithmetic sequence - birthday money", "functions": {}, "rulesets": {}, "ungrouped_variables": ["m", "n", "c", "ci", "ni", "b", "first"], "metadata": {"description": "

The amount of money a person gets on their birthday follows an arithmetic sequence.

\n

Calculate the amount on a given birthday, then calculate the sum up to that point.

We are told that {person['name']}'s parents deposit a uniformly increasing amount of money into a savings account for {person['name']} every year on {person['name']}'s birthday.

\n

We are also given the amount of money that {person['pronouns']['their']} parents deposit into the account on {person['pronouns']['their']} first $3$ birthdays:

\n
\n
• On {person['pronouns']['their']} $1^{st}$ birthday, they deposited $£\\var{first}$ into the account.
• \n
• On {person['pronouns']['their']} $2^{nd}$ birthday, they deposited $£\\var{b[1]+first}$ into the account.
• \n
• On {person['pronouns']['their']} $3^{rd}$ birthday, they deposited $£\\var{b[1]*2+first}$ into the account.
• \n
\n

#### a)

\n

To calculate the amount of money {person['name']}'s parents would deposit into the savings account on {person['pronouns']['their']} 21st birthday, if {pronouns['their']} parents maintained this pattern, we use the equation

\n

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

\n

where

\n
\n
• $a_1$ is the first term;
• \n
• $a_n$ is the $n^{\\text{th}}$ term;
• \n
• $d$ is the common difference between consecutive terms.
• \n
\n

To identify the first term and common difference of the sequence we can use a table like the one below.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$n$ $a_n$ First differences $1$ $2$ $3$ $\\mathbf{\\var{first}}$ $\\var{b[1]+first}$ $\\var{b[1]*2+first}$ $\\mathbf{\\var{b[1]}}$ $\\mathbf{\\var{b[1]}}$
\n

The first term and common difference have been highlighted in bold: $a_1 = \\var{first}$ and $d = \\var{b[1]}$.

\n

Now we can use these to calculate $a_{21}$, giving us

\n

\\begin{align}
a_{21}&=\\var{first}+\\var{b[1]} \\times (21-1) \\\\
&=\\var{first+b[1]*(20)}\\text{.} \\\\
\\end{align}

\n

So, assuming that {person['name']}'s parents do maintain this pattern, on {pronouns['their']} 21st birthday {pronouns['their']} parents will deposit $£\\var{first+b[1]*(20)}$ into the savings account.

\n

#### b)

\n

We are now asked to calculate the total amount of money that {person['name']}'s parents will have added to this savings account over 21 years, including the money that {pronouns['their']} parents will deposit into the account on {pronouns['their']} 21st birthday.

\n

This question involves calculating the sum using the equation

\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}
a_1&=\\var{first},\\\\
n&=21,\\\\
a_{21}&= \\var{first+b[1]*(20)}.
\\end{align}

\n

Using our formula for the sum,

\n

\\begin{align}
\\sum\\limits_{i=1}^n{a_i}&=\\frac{n}{2}(a_1+a_n)\\\\
&=\\frac{\\var{21}}{2}(\\var{first}+\\var{first+b[1]*(21-1)})\\\\
&=\\var{21*(first+first+b[1]*(20))/2}\\text{.}
\\end{align}

\n

Therefore, over 21 years {person['name']}'s parents will have added a total of $£\\var{21*(first+first+b[1]*(20))/2}$ to this savings account!

", "statement": "

{person['name']}'s parents deposit a uniformly increasing amount of money into a savings account for {pronouns['them']} every year on {pronouns['their']} birthday:

\n
\n
• on {pronouns['their']} first birthday {pronouns['their']} parents deposited $£\\var{first}$ into the account;
• \n
• on {pronouns['their']} second birthday {person['pronouns']['their']} parents deposited $£\\var{b[1]+first}$ into the account;
• \n
• on {pronouns['their']} third birthday {pronouns['their']} parents deposited $£\\var{b[1]*2+first}$ into the account.
• \n
\n

{person['name']} wants to know the total amount of money that will be in this savings account, excluding interest, after {pronouns['their']} 21st birthday, if {pronouns['their']} parents maintain this pattern.

", "preamble": {"js": "", "css": ""}, "variables": {"c": {"name": "c", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "repeat(random(3..13 except[10]),8)"}, "n": {"name": "n", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "repeat(random(3..9),7)"}, "person": {"name": "person", "description": "

A random person

", "templateType": "anything", "group": "A person", "definition": "random_person()"}, "m": {"name": "m", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "repeat(random(2..10),5)"}, "first": {"name": "first", "description": "

first term in the sequence

", "templateType": "anything", "group": "Ungrouped variables", "definition": "random(10..15 #5)"}, "pronouns": {"name": "pronouns", "description": "", "templateType": "anything", "group": "A person", "definition": "person['pronouns']"}, "ni": {"name": "ni", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "repeat(random(19..40),10)"}, "b": {"name": "b", "description": "

a

", "templateType": "anything", "group": "Ungrouped variables", "definition": "repeat(random(10..25 #5), 3)"}, "ci": {"name": "ci", "description": "", "templateType": "anything", "group": "Ungrouped variables", "definition": "repeat(random(6..20),10)"}}, "parts": [{"variableReplacementStrategy": "originalfirst", "prompt": "

How much money will {person['name']}'s parents deposit into the savings account on {pronouns['their']} 21st birthday, if {pronouns['their']} parents maintain this pattern?

\n

£[[0]].

", "stepsPenalty": 0, "gaps": [{"answer": "{first+b[1]*(20)}", "showpreview": true, "expectedvariablenames": [], "vsetrangepoints": 5, "variableReplacementStrategy": "originalfirst", "checkingtype": "absdiff", "type": "jme", "checkingaccuracy": 0.001, "variableReplacements": [], "vsetrange": [0, 1], "checkvariablenames": false, "showFeedbackIcon": true, "scripts": {}, "marks": 1, "showCorrectAnswer": true}], "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "type": "gapfill", "marks": 0, "steps": [{"variableReplacementStrategy": "originalfirst", "prompt": "

Use the arithmetic formula,

\n

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

\n

where

\n
\n
• $a_n$ is the $n^\\text{th}$ term;
• \n
• $a_1$ is the first term in the sequence;
• \n
• $d$ is the common difference between consecutive terms.
• \n
", "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "type": "information", "marks": 0, "showCorrectAnswer": true}, {"variableReplacementStrategy": "originalfirst", "correctAnswerStyle": "plain", "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "correctAnswerFraction": false, "maxValue": "{first}", "allowFractions": false, "prompt": "

What is the value of $a_1$?

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

What is the value of $d$?

", "mustBeReducedPC": 0, "minValue": "{b[1]}", "mustBeReduced": false, "variableReplacements": [], "showFeedbackIcon": true, "showCorrectAnswer": true, "marks": "0.2", "scripts": {}}, {"variableReplacementStrategy": "originalfirst", "prompt": "

Now use the formula to calculate $a_{21}$.

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

How much money will {person['name']}'s parents have added to this savings account over $21$ years in total, including the money that {person['pronouns']['their']} parents will deposit into the account on {person['pronouns']['their']} $21^{st}$ birthday?

\n

£[[0]].

\n

", "stepsPenalty": 0, "gaps": [{"variableReplacementStrategy": "originalfirst", "correctAnswerStyle": "plain", "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "correctAnswerFraction": false, "maxValue": "{21*(first+first+b[1]*(20))/2}", "allowFractions": false, "mustBeReducedPC": 0, "minValue": "{21*(first+first+b[1]*(20))/2}", "mustBeReduced": false, "variableReplacements": [], "showFeedbackIcon": true, "showCorrectAnswer": true, "marks": 1, "scripts": {}}], "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "type": "gapfill", "marks": 0, "steps": [{"variableReplacementStrategy": "originalfirst", "prompt": "

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

\n

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

", "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "type": "information", "marks": 0, "showCorrectAnswer": true}], "showCorrectAnswer": true}], "tags": ["Arithmetic sequences", "Arithmetic Sequences", "arithmetic sequences", "nth term", "partial sums", "random names", "sequences", "taxonomy"], "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/"}]}