Difference between revisions of "2008 iTest Problems/Problem 39"

(Extra Note / Interesting Proof)
(Extra Note / Interesting Proof)
Line 10: Line 10:
 
Using the formula <math>\phi(n) = n \cdot (1 - \tfrac{1}{p_1})(1 - \tfrac{1}{p_2}) \cdots (1 - \tfrac{1}{p_n})</math> (or by manually counting the numbers relatively prime to each number), <math>1</math> number is relatively prime to <math>1</math>, <math>1</math> number is relatively prime to <math>2</math>, <math>2</math> numbers are relatively prime to <math>4</math>, <math>4</math> numbers are relatively prime to <math>8</math>, <math>250</math> numbers are relatively prime to <math>251</math>, <math>250</math> numbers are relatively prime to <math>502</math>, <math>500</math> numbers are relatively prime to <math>1004</math>, and <math>1000</math> numbers are relatively prime to <math>2008</math>.  That means <math>S = 2008</math>, and the remainder when <math>S</math> is divided by <math>1000</math> is <math>\boxed{8}</math>.
 
Using the formula <math>\phi(n) = n \cdot (1 - \tfrac{1}{p_1})(1 - \tfrac{1}{p_2}) \cdots (1 - \tfrac{1}{p_n})</math> (or by manually counting the numbers relatively prime to each number), <math>1</math> number is relatively prime to <math>1</math>, <math>1</math> number is relatively prime to <math>2</math>, <math>2</math> numbers are relatively prime to <math>4</math>, <math>4</math> numbers are relatively prime to <math>8</math>, <math>250</math> numbers are relatively prime to <math>251</math>, <math>250</math> numbers are relatively prime to <math>502</math>, <math>500</math> numbers are relatively prime to <math>1004</math>, and <math>1000</math> numbers are relatively prime to <math>2008</math>.  That means <math>S = 2008</math>, and the remainder when <math>S</math> is divided by <math>1000</math> is <math>\boxed{8}</math>.
  
==Extra Note / Interesting Proof==
+
==Extra Note==
 
If all the divisors of an integer n are {<math>{d_1}</math>,  <math>{d_2}</math>,  <math>{d_3}</math>, ... <math>{d_k}</math>}, then n  =  <math>\phi({d_1})</math> +  <math>\phi({d_2})</math> +  .... +  <math>\phi({d_k})</math>.
 
If all the divisors of an integer n are {<math>{d_1}</math>,  <math>{d_2}</math>,  <math>{d_3}</math>, ... <math>{d_k}</math>}, then n  =  <math>\phi({d_1})</math> +  <math>\phi({d_2})</math> +  .... +  <math>\phi({d_k})</math>.
 
This provides a shorter approach in this problem because it asks about the sum of the number of numbers co prime to 2008's divisors, as mentioned earlier. This is the same as 2008 itself, drastically simplifying the problem.
 
This provides a shorter approach in this problem because it asks about the sum of the number of numbers co prime to 2008's divisors, as mentioned earlier. This is the same as 2008 itself, drastically simplifying the problem.
  
Proof:
+
==Proof==
  
 
Given that: <math>n</math> = <math>{p_1}^{\alpha_1}</math><math>{p_2}^{\alpha_2}</math>....<math>{p_k}^{\alpha_k}</math>
 
Given that: <math>n</math> = <math>{p_1}^{\alpha_1}</math><math>{p_2}^{\alpha_2}</math>....<math>{p_k}^{\alpha_k}</math>

Revision as of 23:11, 20 August 2023

Problem

Let $\phi(n)$ denote $\textit{Euler's phi function}$, the number of integers $1\leq i\leq n$ that are relatively prime to $n$. (For example, $\phi(6)=2$ and $\phi(10)=4$.) Let $S=\sum_{d|2008}\phi(d)$, in which $d$ ranges through all positive divisors of $2008$, including $1$ and $2008$. Find the remainder when $S$ is divided by $1000$.

Solution

The divisors of $2008$ are $1$,$2$,$4$,$8$,$251$,$502$,$1004$, and $2008$, so the problem requires the sum of the number of numbers relatively prime to each of the eight numbers.

Using the formula $\phi(n) = n \cdot (1 - \tfrac{1}{p_1})(1 - \tfrac{1}{p_2}) \cdots (1 - \tfrac{1}{p_n})$ (or by manually counting the numbers relatively prime to each number), $1$ number is relatively prime to $1$, $1$ number is relatively prime to $2$, $2$ numbers are relatively prime to $4$, $4$ numbers are relatively prime to $8$, $250$ numbers are relatively prime to $251$, $250$ numbers are relatively prime to $502$, $500$ numbers are relatively prime to $1004$, and $1000$ numbers are relatively prime to $2008$. That means $S = 2008$, and the remainder when $S$ is divided by $1000$ is $\boxed{8}$.

Extra Note

If all the divisors of an integer n are {${d_1}$, ${d_2}$, ${d_3}$, ... ${d_k}$}, then n = $\phi({d_1})$ + $\phi({d_2})$ + .... + $\phi({d_k})$. This provides a shorter approach in this problem because it asks about the sum of the number of numbers co prime to 2008's divisors, as mentioned earlier. This is the same as 2008 itself, drastically simplifying the problem.

Proof

Given that: $n$ = ${p_1}^{\alpha_1}$${p_2}^{\alpha_2}$....${p_k}^{\alpha_k}$

and

${d_1}$, ${d_2}$, .... ${d_m}$ are all of $n$'s divisors

$\phi({d_1})$ + $\phi({d_2})$ + ... + $\phi({d_m})$

= ${p_1}(1-\frac{1}{p_1})$ + ${p_2}(1-\frac{1}{p_2})$ + ${p_1} {p_2}(1-\frac{1}{p_1})(1-\frac{1}{p_2})$...

The above term represents the sum of the totient functions of all of n's divisors.

= $(1 - \frac{1}{p_1})$$(1 - \frac{1}{p_2})$ $({p_1} + {p_1}^{2} + ... + {p_1}^{\alpha_1})$ $({p_2} + {p_2}^{2} + ... + {p_2}^{\alpha_2})$ + ....

= $(1 + (1 - \frac{1}{p_1})$$({p_1} + {p_1}^{2} + ... + {p_1}^{\alpha_1})$)$(1 + (1 - \frac{1}{p_2})$$({p_2} + {p_2}^{2} + ... + {p_2}^{\alpha_2})$) ... $(1 + (1 - \frac{1}{p_k})$$({p_k} + {p_k}^{2} + ... + {p_k}^{\alpha_k})$

= $(1 + {p_1} + {p_1}^{2} + ... + {p_1}^{\alpha_1} - (1 + {p_1} + {p_1}^{2} + ... + {p_1}^{\alpha_1 - 1}))$

$(1 + {p_2} + {p_2}^{2} + ... + {p_2}^{\alpha_2} - (1 + {p_2} + {p_2}^{2} + ... + {p_2}^{\alpha_2 - 1}))$...

$(1 + {p_k} + {p_k}^{2} + ... + {p_k}^{\alpha_k} - (1 + {p_k} + {p_k}^{2} + ... + {p_k}^{\alpha_k - 1}))$

= ${p_1}^{\alpha_1}$${p_2}^{\alpha_2}$ ... ${p_k}^{\alpha_k}$

= $n$

See Also

2008 iTest (Problems)
Preceded by:
Problem 38
Followed by:
Problem 40
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100