// Numbas version: finer_feedback_settings {"name": "Find all numbers with given value of $\\phi(n)$", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "variables": {"bp": {"templateType": "anything", "group": "Ungrouped variables", "definition": "ordp[0]*ordp[1]", "description": "", "name": "bp"}, "gcp": {"templateType": "anything", "group": "Ungrouped variables", "definition": "gcd(bp,tp)", "description": "", "name": "gcp"}, "chkmp": {"templateType": "anything", "group": "Ungrouped variables", "definition": "map(if(x=pairs[j][0] or x=pairs[j][1],1,-1),x,0..abs(p)-1)", "description": "", "name": "chkmp"}, "bfp": {"templateType": "anything", "group": "Ungrouped variables", "definition": "ordp[1]", "description": "", "name": "bfp"}, "j": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(0..17)", "description": "", "name": "j"}, "ordp": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[p[pairs[j][0]],p[pairs[j][1]]]", "description": "", "name": "ordp"}, "pairs": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[[0,3],[0,4],[0,5],[0,6],[0,7],[0,8],[0,9],[0,10],[0,11],[1,3],[1,5],[1,7],[1,10],[2,4],[2,10],[2,12],[3,9],[3,13],[4,8]]", "description": "", "name": "pairs"}, "p": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[2,3,5,7,11,13,17,19,23,29,31,37,41,43]", "description": "", "name": "p"}, "tp": {"templateType": "anything", "group": "Ungrouped variables", "definition": "(ordp[0]-1)*(ordp[1]-1)", "description": "", "name": "tp"}, "bp1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "bp/gcp", "description": "", "name": "bp1"}, "tp1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "tp/gcp", "description": "", "name": "tp1"}}, "ungrouped_variables": ["pairs", "p", "chkmp", "j", "tp", "bp1", "gcp", "bfp", "bp", "tp1", "ordp"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "name": "Find all numbers with given value of $\\phi(n)$", "functions": {}, "showQuestionGroupNames": false, "parts": [{"stepsPenalty": 0, "scripts": {}, "gaps": [{"displayType": "checkbox", "choices": ["2", "3", "5", "7", "11", "13", "17", "19", "23", "29", "31", "37", "41", "43"], "matrix": ["chkmp[0]", "chkmp[1]", "chkmp[2]", "chkmp[3]", "chkmp[4]", "chkmp[5]", "chkmp[6]", "chkmp[7]", "chkmp[8]", "chkmp[9]", "chkmp[10]", "chkmp[11]", "chkmp[12]", "chkmp[13]"], "distractors": ["", "", "", "", "", "", "", "", "", "", "", "", "", ""], "type": "m_n_2", "maxAnswers": 0, "shuffleChoices": false, "scripts": {}, "minMarks": 0, "minAnswers": 0, "maxMarks": 0, "showCorrectAnswer": true, "displayColumns": 7, "marks": 0}], "type": "gapfill", "prompt": "
Find all natural numbers $n$ such that $\\phi(n)=\\simplify[std]{{tp1}/{bp1}}n$
\nYou are given that the general form of $n$ is \\[n = p_1^{\\alpha_1} p_2^{\\alpha_2}\\cdots p_s^{\\alpha_s}\\]
\nfor a fixed set of primes $p_1,\\;p_2,\\ldots,p_s$ where $\\alpha_j \\ge 1\\;\\;j=1,\\ldots,\\;s$.
\nSelect the primes involved from these choices.
\n[[0]]
\nNote that you are deducted one mark for every wrong choice. The minimum mark is 0.
", "steps": [{"type": "information", "prompt": "\n\n\nUse the formula for $\\phi(n)$:
\n\n\n\n\\[\\phi(n)= n\\left(1-\\frac{1}{p_1}\\right)\\left(1-\\frac{1}{p_2}\\right)\\cdots \\left(1-\\frac{1}{p_s}\\right)\\]
\n\n\n\nwhere $n = p_1^{\\alpha_1} p_2^{\\alpha_2}\\cdots p_s^{\\alpha_s},\\;\\;\\;\\alpha_j \\ge 1\\;\\;j=1,\\ldots,\\;s$
\n\n", "showCorrectAnswer": true, "scripts": {}, "marks": 0}], "showCorrectAnswer": true, "marks": 0}], "statement": "", "tags": ["checked2015", "coprime", "euler totient function", "factors", "MAS3214", "number theory", "prime decomposition", "prime factorisation", "primes"], "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "", "licence": "Creative Commons Attribution 4.0 International", "description": "Given $\\frac{a}{b} \\in \\mathbb{Q}$ for suitable choices of $a$ and $b$, find all $n \\in \\mathbb{N}$ such that $\\phi(n)=\\frac{a}{b}n$.
"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "\n\n\nWe can write the formula for the Euler Totient Function for \\[n = p_1^{\\alpha_1} p_2^{\\alpha_2}\\cdots p_s^{\\alpha_s},\\;\\;\\;\\alpha_j \\ge 1\\;\\;j=1,\\ldots,\\;s\\] as
\n\n\n\n\\[\\phi(n)= n\\left(1-\\frac{1}{p_1}\\right)\\left(1-\\frac{1}{p_2}\\right)\\cdots \\left(1-\\frac{1}{p_s}\\right)\\]
Hence we have:
\\[ \\begin{eqnarray*}\n\n\\phi(n)= n\\left(1-\\frac{1}{p_1}\\right)\\left(1-\\frac{1}{p_2}\\right)\\cdots \\left(1-\\frac{1}{p_s}\\right)&=&\\simplify[std]{{tp1}/{bp1}}n \\Rightarrow\\\\\n\n\\left(1-\\frac{1}{p_1}\\right)\\left(1-\\frac{1}{p_2}\\right)\\cdots \\left(1-\\frac{1}{p_s}\\right)&=&\\simplify[std]{{tp1}/{bp1}}\n\n\\end{eqnarray*}\n\n\\]
It is clear from the denominator of $\\frac{\\var{tp1}}{\\var{bp1}}$ that the prime $\\var{ordp[1]}$ must be in the factorization of $n$.
We can assume that $p_1=\\var{ordp[1]}$.
Substituting these values in the identity above gives:
\\[ \\begin{eqnarray*}\n\n\\left(1-\\frac{1}{\\var{ordp[1]}}\\right)\\left(1-\\frac{1}{p_2}\\right)\\cdots \\left(1-\\frac{1}{p_s}\\right)&=&\\simplify[std]{{tp1}/{bp1}}\\Rightarrow\\\\\n\n\\left(\\frac{\\var{ordp[1]-1}}{\\var{ordp[1]}}\\right)\\left(1-\\frac{1}{p_2}\\right)\\cdots \\left(1-\\frac{1}{p_s}\\right)&=&\\simplify[std]{{tp1}/{bp1}}\\Rightarrow\\\\\n\n\\left(1-\\frac{1}{p_2}\\right)\\cdots \\left(1-\\frac{1}{p_s}\\right)&=&\\frac{\\var{ordp[0]-1}}{\\var{ordp[0]}}\n\n\\end{eqnarray*}\n\n\\]
Hence we see that $\\var{ordp[0]}$ is also in the prime decomposition of $n$ and putting $p_2=\\var{ordp[0]}$ we find:
\\[\\begin{eqnarray*}\n\n\\left(\\simplify[std]{{ordp[0]-1}/{ordp[0]}}\\right)\\left(1-\\frac{1}{p_3}\\right)\\cdots \\left(1-\\frac{1}{p_s}\\right)&=&\\frac{\\var{ordp[0]-1}}{\\var{ordp[0]}}\\\\\n\n\\end{eqnarray*}\n\n\\]
But the only way that can happen is when there are only the two primes we have already found.
\n\n\n\nHence we see that $\\var{ordp[0]}$ and $\\var{ordp[1]}$ are the only two primes in the factorization of $n$ and that:
\\[n =\\var{ordp[0]}^{\\alpha_1}\\var{ordp[1]}^{\\alpha_2},\\;\\;\\alpha_1,\\;\\;\\alpha_2 \\ge 1\\]