// Numbas version: exam_results_page_options {"name": "Arithmetic Sequence - Work with any two terms", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Arithmetic Sequence - Work with any two terms", "tags": [], "metadata": {"description": "Given two (not necessarily consecutive) terms in an arithmetic sequence, evaluate the common difference, first term and then apply to find sum of a number of terms.  (Working with integer terms only)", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

In an arithmetic sequence the {term_a} term is {u_a} and the {term_b} is {u_b}.

", "advice": "

In part (a) you should divide the difference between the {term_b} term and the {term_a} term by {n}

\n

({u_b}-{u_a})/{n} = {d}

\n

In part (b) use the formula

\n

$u_n = u_1  + (n-1)d$ 

\n

and rearrange to find $u_1$ either using the {term_a} or {term_b} term and calculated value of $d$

\n

$u_1 =$ {u_1}

\n

In part c use the formula for the sum of n terms of an arithmetic sequence

\n

$S_n = \\frac{n}{2}(2u_1+(n-1)d)$

\n

In this case the sum of the first {number_sum} terms is

\n

= ({terms_to_sum}/2) x (2 x {u_1} + ({terms_to_sum} - 1) x {d}))

\n

= {sum_val}

\n

", "rulesets": {}, "extensions": [], "variables": {"term_a": {"name": "term_a", "group": "Ungrouped variables", "definition": "\"{terms_eng[{a}-1]}\"", "description": "

english word for the term number given first in problem.

", "templateType": "string"}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(3 .. 7#1)", "description": "

number of smaller term given in problem.

", "templateType": "randrange"}, "terms_eng": {"name": "terms_eng", "group": "Ungrouped variables", "definition": "[ \"first\", \"second\", \"third\", \"fourth\", \"fifth\", \"sixth\", \"seventh\", \"eighth\", \"ninth\", \"tenth\", \"eleventh\", \"twelfth\", \"thirteenth\" ]", "description": "

list to convert numbers to word for term

", "templateType": "list of strings"}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "random(2 .. 6#1)", "description": "

Common difference in this sequence.

", "templateType": "randrange"}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(2 .. 5#1)", "description": "

difference in terms of number of terms

", "templateType": "randrange"}, "u_a": {"name": "u_a", "group": "Ungrouped variables", "definition": "{u_1}+({a}-1)*{d}", "description": "

value of ath term

", "templateType": "anything"}, "u_1": {"name": "u_1", "group": "Ungrouped variables", "definition": "random(2 .. 7#0.5)", "description": "

First term in this sequence

", "templateType": "randrange"}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "{a}+{n}", "description": "

term number of larger term in sequence

", "templateType": "anything"}, "u_b": {"name": "u_b", "group": "Ungrouped variables", "definition": "{u_1}+({b}-1)*{d}", "description": "

value of bth term

", "templateType": "anything"}, "term_b": {"name": "term_b", "group": "Ungrouped variables", "definition": "\"{terms_eng[{b}-1]}\"", "description": "

term number in words

", "templateType": "string"}, "number_eng": {"name": "number_eng", "group": "Ungrouped variables", "definition": "[ \"one\", \"two\", \"three\", \"four\", \"five\", \"six\", \"seven\", \"eight\", \"nine\", \"ten\", \"eleven\", \"twelve\", \"thirteen\", \"fourteen\", \"fifteen\", \"sixteen\", \"seventeen\", \"eighteen\", \"nineteen\", \"twenty\", \"twentyone\", \"twentytwo\", \"twentythree\", \"twentyfour\", \"twentyfive\" ]", "description": "

table to convert numbers to words

", "templateType": "list of strings"}, "terms_to_sum": {"name": "terms_to_sum", "group": "Ungrouped variables", "definition": "random(15 .. 25#5)", "description": "

variable denoting how many terms should be summed (always a multiple of 5)

", "templateType": "randrange"}, "number_sum": {"name": "number_sum", "group": "Ungrouped variables", "definition": "\"{number_eng[{terms_to_sum}-1]}\"", "description": "

terms_to_sum converted to words

", "templateType": "string"}, "sum_val": {"name": "sum_val", "group": "Ungrouped variables", "definition": "({terms_to_sum}/2)*(2*{u_1}+({terms_to_sum}-1)*{d})", "description": "

evaluation of sum of appropriate number of terms

", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["term_a", "a", "terms_eng", "d", "n", "u_a", "u_1", "b", "u_b", "term_b", "number_eng", "terms_to_sum", "number_sum", "sum_val"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Find the common difference.

", "minValue": "{d}", "maxValue": "{d}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en", "eu", "plain-eu"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Find the first term.

", "minValue": "{u_1}", "maxValue": "{u_1}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en", "eu", "plain-eu"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": "3", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Find the sum of the first {number_sum} terms.

", "minValue": "{sum_val}", "maxValue": "{sum_val}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en", "eu", "plain-eu"], "correctAnswerStyle": "plain"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Johnathan Gregg", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4974/"}]}]}], "contributors": [{"name": "Johnathan Gregg", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4974/"}]}