// Numbas version: finer_feedback_settings {"name": "Find $\\mu(n)$, $\\sigma(n)$, $\\tau(n)$, $\\phi(n)$", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "variables": {"siga1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[(p[0]^(c[0]+1)-1)/(p[0]-1),(p[1]^(c[1]+1)-1)/(p[1]-1),(p[2]^(c[2]+1)-1)/(p[2]-1),(p[3]^(c[3]+1)-1)/(p[3]-1),(p[4]^(c[4]+1)-1)/(p[4]-1)]", "description": "", "name": "siga1"}, "sig": {"templateType": "anything", "group": "Ungrouped variables", "definition": "prodlist(siga,1,4)", "description": "", "name": "sig"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(s=0,a2+a1,a1+a2)", "description": "", "name": "a"}, "siga": {"templateType": "anything", "group": "Ungrouped variables", "definition": "map(max(x,1),x,siga1)", "description": "", "name": "siga"}, "t": {"templateType": "anything", "group": "Ungrouped variables", "definition": "3", "description": "", "name": "t"}, "a1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "repeat(random(1..t),2)", "description": "", "name": "a1"}, "mu": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(mu2=1,(-1)^mu1,0)", "description": "", "name": "mu"}, "eorodd": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(notzero|2,'even','odd')", "description": "", "name": "eorodd"}, "n": {"templateType": "anything", "group": "Ungrouped variables", "definition": "p[0]^c[0]*p[1]^c[1]*p[2]^c[2]*p[3]^c[3]*p[4]^c[4]", "description": "", "name": "n"}, "b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "sort(a)", "description": "", "name": "b"}, "p": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[2,3,5,7,11]", "description": "", "name": "p"}, "a2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "repeat(random(0..2),2)", "description": "", "name": "a2"}, "c": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[b[0],b[1]-b[0],b[2]-b[1],b[3]-b[2],t-b[3]]", "description": "", "name": "c"}, "d": {"templateType": "anything", "group": "Ungrouped variables", "definition": "sort(c)", "description": "", "name": "d"}, "mess": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(mu2>1, 'however','and')", "description": "", "name": "mess"}, "phi": {"templateType": "anything", "group": "Ungrouped variables", "definition": "prodlist(phia,1,4)", "description": "", "name": "phi"}, "ta": {"templateType": "anything", "group": "Ungrouped variables", "definition": "(1+c[0])*(1+c[1])*(1+c[2])*(1+c[3])*(1+c[4])", "description": "", "name": "ta"}, "mu1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "sum(c)", "description": "", "name": "mu1"}, "s": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(0,1)", "description": "", "name": "s"}, "mu2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "d[4]", "description": "", "name": "mu2"}, "phia1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "[p[0]^(c[0]-1)*(p[0]-1),p[1]^(c[1]-1)*(p[1]-1),p[2]^(c[2]-1)*(p[2]-1),p[3]^(c[3]-1)*(p[3]-1),p[4]^(c[4]-1)*(p[4]-1)]", "description": "", "name": "phia1"}, "phia": {"templateType": "anything", "group": "Ungrouped variables", "definition": "map(max(x,1),x,phia1)", "description": "", "name": "phia"}, "notzero": {"templateType": "anything", "group": "Ungrouped variables", "definition": "sum(map(min(x,1),x,c))", "description": "", "name": "notzero"}}, "ungrouped_variables": ["siga", "eorodd", "phia1", "notzero", "sig", "siga1", "ta", "phi", "mess", "a1", "a2", "a", "c", "b", "mu1", "d", "phia", "mu2", "n", "mu", "p", "s", "t"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "name": "Find $\\mu(n)$, $\\sigma(n)$, $\\tau(n)$, $\\phi(n)$", "functions": {"prodlist": {"type": "number", "language": "jme", "definition": "if(n=-1,p,prodlist(a,p*a[n],n-1))", "parameters": [["a", "list"], ["p", "number"], ["n", "number"]]}}, "showQuestionGroupNames": false, "parts": [{"stepsPenalty": 0, "scripts": {}, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{mu}", "minValue": "{mu}", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{ta}", "minValue": "{ta}", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{sig}", "minValue": "{sig}", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}, {"showCorrectAnswer": true, "allowFractions": false, "scripts": {}, "type": "numberentry", "maxValue": "{phi}", "minValue": "{phi}", "correctAnswerFraction": false, "marks": 1, "showPrecisionHint": false}], "type": "gapfill", "prompt": "\n\n\n
Let $n=\\var{n}$.
\n\n\n\nFind:
\n\n\n\n$\\mu(n) =\\;\\;$[[0]]
\n\n\n\n$\\tau(n)=\\;\\;$[[1]]
\n\n\n\n$\\sigma(n)=\\;\\;$[[2]]
\n\n\n\n$\\phi(n)=\\;\\;$[[3]]
\n\n", "steps": [{"type": "information", "prompt": "\n\n\n$\\mu(n)$ gives information on the prime decomposition of $n$ (see formula below).
\n\n\n\n$\\tau(n)$ gives the number of divisors of $n$.
\n\n\n\n$\\sigma(n)$ is the sum of all divisors of $n$
\n\n\n\n$\\phi(n)$ is the number of natural integers $\\lt n$ which are coprime to $n$.
\n\n\n\nAll are multiplicative functions i.e. $f(n)$ is multiplicative if $n_1,\\;n_2$ are coprime then:
\\[ f(n_1n_2)=f(n_1)f(n_2)\\]
Recall that if $n=p_1^{\\beta_1}\\times p_2^{\\beta_2}\\times \\cdots \\times p_m^{\\beta_m},\\;\\;\\beta_j \\ge 1,\\;\\forall j$ is the prime factorization of $n$ then:
\\[\\begin{eqnarray*}\\mu(n)&=&0, \\mbox{ if }\\exists j, p_j \\ge 2\\\\\n\n&=&(-1)^m, \\mbox{ if }\\beta_j=1,\\;\\;\\forall j\\\\\n\n\\\\\n\n\\tau(n)&=&(\\beta_1+1)\\times (\\beta_2+1) \\times\\cdots \\times (\\beta_m+1)\\\\\n\n\\\\\n\n\\sigma(n)&=& \\frac{(p_1^{\\beta_1+1}-1)}{p_1-1}\\times \\frac{(p_2^{\\beta_2+1}-1)}{p_2-1} \\times \\cdots \\times \\frac{(p_m^{\\beta_m+1}-1)}{p_m-1}\\\\\n\n\\\\\n\n\\phi(n) &=& (p_1^{\\beta_1} - p_1^{\\beta_1-1})\\times (p_2^{\\beta_2} - p_2^{\\beta_2-1})\\times\\cdots \\times (p_m^{\\beta_m} - p_m^{\\beta_m-1})\n\n\\end{eqnarray*}\n\n\\]
Number Theory.
\nGiven $n \\in \\mathbb{N}$ find $\\mu(n),\\;\\tau(n),\\;\\sigma(n),\\;\\phi(n).$
"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "\n\n\nThe factorization into a product of powers of prime factors is given by:
\n\n\n\n$\\var{n} = \\simplify[unitFactor,unitPower,zeroPower]{{p[0]}^{c[0]}*{p[1]}^{c[1]}*{p[2]}^{c[2]}*{p[3]}^{c[3]}*{p[4]}^{c[4]}}$
\n\n\n\nThere are an {eorodd} number $\\var{notzero}$ of distinct prime factors, {mess} since the maximum power of any prime in this factorization is {d[4]} we see that
\n\n\n\n$\\mu(\\var{n})=\\;\\var{mu}$
\n\n\n\nRecall that if $n=p_1^{\\beta_1}\\times p_2^{\\beta_2}\\times \\cdots \\times p_m^{\\beta_m}$ is the prime factorization of $n$, then the number of divisors is given by:
\n\n\n\n$\\tau(n)=(\\beta_1+1)\\times (\\beta_2+1) \\times\\cdots \\times (\\beta_m+1)$
\n\n\n\nHence in this case we have:
\n\n\n\n$\\tau(\\var{n})=\\tau( \\simplify[unitFactor,unitPower,zeroPower]{{p[0]}^{c[0]}*{p[1]}^{c[1]}*{p[2]}^{c[2]}*{p[3]}^{c[3]}*{p[4]}^{c[4]}})=\\simplify[!basic,unitFactor,zeroTerm]{({c[0]}+1)*({c[1]}+1)*({c[2]}+1)*({c[3]}+1)*({c[4]}+1)}=\\var{ta}$
\n\n\n\nThe sum over all divisors is given by :
\n\n\n\n\\[\\sigma(n)= \\frac{(p_1^{\\beta_1+1}-1)}{p_1-1}\\times \\frac{(p_2^{\\beta_2+1}-1)}{p_2-1} \\times \\cdots \\times \\frac{(p_m^{\\beta_m+1}-1)}{p_m-1}\\]
\n\n\n\nIn this case we have:
\n\n\n\n\\[\\begin{eqnarray*}\n\n\\sigma(\\var{n})&=&\\sigma( \\simplify[unitFactor,unitPower,zeroPower]{{p[0]}^{c[0]}*{p[1]}^{c[1]}*{p[2]}^{c[2]}*{p[3]}^{c[3]}*{p[4]}^{c[4]}})\\\\ \n\n&=&\\simplify[unitFactor]{{siga[0]}*{siga[1]}*{siga[2]}*{siga[3]}*{siga[4]}}\\\\\n\n&=&\\var{sig}\n\n\\end{eqnarray*}\n\n\\]
\n\n\n\nThis is the Euler totient function and $\\phi(n)$ it counts up the number of integers less than $n$ which are coprime to $n$.
\n\n\n\nThe formula we use for this is given by:
\n\n\n\n\\[\\phi(n) = (p_1^{\\beta_1} - p_1^{\\beta_1-1})\\times (p_2^{\\beta_2} - p_2^{\\beta_2-1})\\times\\cdots \\times (p_m^{\\beta_m} - p_m^{\\beta_m-1})\\]
\n\n\n\n$\\phi(\\var{n})=\\phi( \\simplify[unitFactor,unitPower,zeroPower]{{p[0]}^{c[0]}*{p[1]}^{c[1]}*{p[2]}^{c[2]}*{p[3]}^{c[3]}*{p[4]}^{c[4]}})=\\simplify[unitFactor]{{phia[0]}*{phia[1]}*{phia[2]}*{phia[3]}*{phia[4]}}=\\var{phi}$
\n\n", "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}