// Numbas version: exam_results_page_options {"name": "Geometric progression: The sum of the first n terms of a geometric progression", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"advice": "

If the ratio between successive pairs of terms is a constant then the series under examination is a geometric progression.

\n

Ths first term is \$$a\$$ and the common ratio is \$$r\$$.

\n

The formula for the sum of the first \$$n\$$ terms of the series is given by:    \$$S_n=\\frac{a(1-r^{n})}{1-r}\$$

\n

In this example \$$a=\\var{a}\$$,   \$$r = \\frac{\\simplify{{a}*{r}}}{\\var{a}}=\\var{r}\$$  and  \$$n = \\var{n}\$$

\n

\$$S_\\var{n}=\\frac{\\var{a}(1-(\\var{r})^{\\var{n}})}{1-\\var{r}}\$$

\n

\$$S_\\var{n}=\\frac{\\var{a}*(\\simplify{1-{r}^{n}})}{\\simplify{1-{r}}}\$$

\n

\$$S_\\var{n}=\\frac{\\simplify{{a}*(1-{r}^{n})}}{\\simplify{1-{r}}}\$$

\n

\$$S_\\var{n}=\\var{s}\$$

", "statement": "

The first three terms of a series are given by:

\n

\$$\\var{a} + \\simplify{{a}*{r}} + \\simplify{{a}*{r}^2}\\,+ \\, ...........\$$

", "variable_groups": [], "variables": {"a": {"name": "a", "definition": "random(1..12#1)", "group": "Ungrouped variables", "description": "", "templateType": "randrange"}, "s": {"name": "s", "definition": "({a}*(1-{r}^{n}))/(1-{r})", "group": "Ungrouped variables", "description": "", "templateType": "anything"}, "n": {"name": "n", "definition": "random(4..19#1)", "group": "Ungrouped variables", "description": "", "templateType": "randrange"}, "r": {"name": "r", "definition": "random(0.2..3#0.2)", "group": "Ungrouped variables", "description": "", "templateType": "randrange"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "preamble": {"js": "", "css": ""}, "extensions": [], "rulesets": {}, "tags": [], "contributors": [{"name": "Frank Doheny", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/789/"}], "ungrouped_variables": ["a", "r", "n", "s"], "type": "question", "metadata": {"licence": "Creative Commons Attribution-NonCommercial 4.0 International", "description": "

Find the sum of the first n terms of a Geometric progression

"}, "name": "Geometric progression: The sum of the first n terms of a geometric progression", "functions": {}, "parts": [{"variableReplacements": [], "prompt": "

Calculate the sum of the first \$$\\var{n}\$$ terms of the series.

\n

\$$S_\\var{n}=\$$ [[0]]

", "showFeedbackIcon": true, "type": "gapfill", "showCorrectAnswer": true, "gaps": [{"precisionPartialCredit": 0, "precision": "1", "mustBeReducedPC": 0, "variableReplacements": [], "allowFractions": false, "showPrecisionHint": true, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "minValue": "{s}", "correctAnswerStyle": "plain", "notationStyles": ["plain", "en", "si-en"], "maxValue": "{s}", "correctAnswerFraction": false, "strictPrecision": false, "showFeedbackIcon": true, "type": "numberentry", "scripts": {}, "precisionMessage": "You have not given your answer to the correct precision.", "precisionType": "dp", "mustBeReduced": false, "marks": 1}], "scripts": {}, "marks": 0, "variableReplacementStrategy": "originalfirst"}]}]}], "contributors": [{"name": "Frank Doheny", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/789/"}]}