Find the sum of all integers divisible by $6$ between $1$ and $500$.
Tính tổng tất cả các số nguyên chia hết cho $6$ nằm giữa $1$ và $500$.
Xem đáp án và lời giải
Đáp án: $20916$
Phương pháp & Lời giải:
Các số lập thành cấp số cộng với $a_1 = 6$, công sai $d = 6$, số cuối là $a_n = 498$ (vì $500 = 6 \cdot 83 + 2$). Số hạng: $n = \dfrac{498}{6} = 83$. Tổng: $S = \dfrac{83(6 + 498)}{2} = 83 \cdot 252 = 20916$.
Trích nguồn nguyên bản: Slaught & Lennes 1917, p. 576, Ex. 14.
A frog begins at $P_0 = (0, 0)$ and makes a sequence of jumps according to the following rule: from $P_n = (x_n, y_n)$, the frog jumps to $P_{n+1}$, which may be any of the points $(x_n + 7, y_n + 2)$, $(x_n + 2, y_n + 7)$, $(x_n - 5, y_n - 10)$, or $(x_n - 10, y_n - 5)$. There are $M$ points $(x, y)$ with $|x| + |y| \leqslant 100$ that can be reached by a sequence of such jumps. Find the remainder when $M$ is divided by $1000$.
Xem đáp án và lời giải
Đáp án: $373$
Note that $x_{n+1} + y_{n+1} \equiv x_n + y_n \pmod{3}$ and $x_{n+1} - y_{n+1} \equiv x_n - y_n \pmod{5}$, so each reachable point is at the intersection of a line $x + y = 3j$ and a line $x - y = 5k$ with $-33 \leqslant j \leqslant 33$ and $-20 \leqslant k \leqslant 20$. Furthermore, $j$ and $k$ must have the same parity. The number of points that meet these conditions is $33 \cdot 21 + 34 \cdot 20 = 1373$. Call these points good. To see that each good point is reachable, note first that it is possible to move from the line $x - y = 5k$ to either of the lines $x - y = 5(k+1)$ or $x - y = 5(k-1)$ by moving from $(x, x-5k)$ to $(x-5, x-5k-10)$ or $(x+2, x-5k+7)$, respectively. Therefore there is at least one reachable point on each line $x - y = 5k$ for $-20 \leqslant k \leqslant 20$. It is also possible to go from $(x, y)$ to either $(x+9, y+9)$ or $(x-15, y-15)$ in two moves, so it is possible to make a sequence of moves from $(x, x+5k)$ to either $(x+3, x+5k+3)$ or $(x-3, x+5k-3)$. Thus if any good point on the line $x - y = 5k$ is reachable, so is every good point on that line. This implies that $M = 1373$, and the remainder when $M$ is divided by $1000$ is $373$.
In a group of nine people each person shakes hands with exactly two of the other people from the group. Let $N$ be the number of ways this handshaking can occur. Consider two handshaking arrangements different if and only if at least two people who shake hands under one arrangement do not shake hands under the other arrangement. Find the remainder when $N$ is divided by $1000$.
Xem đáp án và lời giải
Đáp án: $16$
For any particular method of conducting the handshakes, define a minimal cycle to be any subset of the $9$ people in which no handshake occurs between a person in the subset and a person outside the subset, and no proper subset has property (1). For any particular method of conducting the handshakes select any one of the nine people, $A$. Intersect all subsets of people both containing $A$ and satisfying condition (1). This intersection will satisfy condition (2) and therefore will be minimal. It follows that for any particular method of conducting the handshakes, the set of nine people can be uniquely partitioned into minimal cycles. The minimum size of a minimal cycle is $3$, so the $9$ people can be partitioned into $3$ minimal cycles of $3$ people each, a minimal cycle of $3$ people and a minimal cycle of $6$ people, a minimal cycle of $4$ people and a minimal cycle of $5$ people, or a minimal cycle of $9$ people. Consider a minimal cycle of size $n \geqslant 3$. Select one person $A$ from this set. The two people with whom $A$ shakes hands (call them $B$ and $C$) can be selected in $C_{n-1}^2$ ways. The set being minimal implies that $B$ shakes hands with a fourth person $D$ (for $n > 3$), $D$ shakes hands with a fifth person $E$ (for $n > 4$), and so on, with the last person in the set shaking hands with $C$. Thus there are $C_{n-1}^2 \cdot (n-3)!$ methods of assigning the handshakes within this minimal cycle. When $n = 3, 4, 5, 6,$ and $9$, the number of methods are $1, 3, 12, 60,$ and $20160$, respectively. It remains only to determine the number of ways the partitions can be formed. The 3-3-3 partition can be done in $\dfrac{C_9^3 C_6^3}{3!} = 280$ ways, the 3-6 partition in $C_9^3 = 84$ ways, the 4-5 partition in $C_9^4 = 126$ ways, and the 9 partition in $1$ way. Thus the total number of methods is \[ 280 \cdot 1 \cdot 1 \cdot 1 + 84 \cdot 1 \cdot 60 + 126 \cdot 3 \cdot 12 + 1 \cdot 20160 = 30016, \] and the requested remainder is $16$.
Let $A = \{1, 2, 3, 4, 5, 6, 7\}$, and let $N$ be the number of functions $f$ from set $A$ to set $A$ such that $f(f(x))$ is a constant function. Find the remainder when $N$ is divided by $1000$.
Xem đáp án và lời giải
Đáp án: $399$
Suppose that $f$ is a function from $A$ to $A$ such that $f(f(x))$ is constant. Let $a \in A$ be the constant value of $f(f(x))$. Suppose that $S = \{x \in A \mid f(x) = a\}$ has $k$ elements. Note that $a \in S$, and for $x \notin S$, $f(x) \in S - \{a\}$. It follows that one can choose such a function $f$ by selecting $a$ in one of $7$ ways, selecting the other elements of $S$ in $C_6^{k-1}$ ways, and selecting values for $f(x)$ for each $x \notin S$ in $(k - 1)^{7-k}$ ways. Thus the number of functions is \[\sum_{k=1}^{7} 7 \cdot C_6^{k-1} \cdot (k - 1)^{7-k} = 0 + 7 \cdot 6 + 7 \cdot 240 + 7 \cdot 540 + 7 \cdot 240 + 7 \cdot 30 + 7 \cdot 1 = 7 \cdot 1057.\] The requested remainder is then $7 \cdot 57 = 399$.
For positive integers $n$ and $k$, let $f(n, k)$ be the remainder when $n$ is divided by $k$, and for $n > 1$ let $F(n) = \max\limits_{1 \leqslant k \leqslant \frac{n}{2}} f(n, k)$. Find the remainder when $\sum\limits_{n=20}^{100} F(n)$ is divided by $1000$.
Xem đáp án và lời giải
Đáp án: $512$
If $m > 1$, then \[f(3m, m + 1) = m - 2, f(3m + 1, m + 1) = m - 1, f(3m + 2, m + 1) = m.\] Furthermore, \[f(3m, k) < m - 2 \text{ for } k \leqslant m - 2, f(3m, m - 1) = 3, f(3m, m) = 0,\] and \[f(3m, k) = 3m - 2k < m - 2 \text{ for } m + 1 < k \leqslant \dfrac{3m}{2}.\] Therefore $F(3m) = m - 2$. Because $F(n + 1) \leqslant F(n) + 1$ for all $n$, it follows that $F(3m + 1) = m - 1$ and $F(3m + 2) = m$. Thus $$
\begin{aligned} \sum_{n=20}^{100} F(n) &= \sum_{m=7}^{33} (F(3m - 1) + F(3m) + F(3m + 1)) \\ &= \sum_{m=7}^{33} ((m - 1) + (m - 2) + (m - 1)) \\ &= 3 \sum_{m=7}^{33} (m - 1) - 27 \\ &= 3 \cdot \dfrac{27(6 + 32)}{2} - 27 = 1512. \end{aligned}
$$ The requested remainder is $512$.
Consider arrangements of the 9 numbers $1, 2, 3, \ldots, 9$ in a $3 \times 3$ array. For each such arrangement, let $a_1$, $a_2$, and $a_3$ be the medians of the numbers in rows 1, 2, and 3, respectively, and then let $m$ be the median of $\{a_1, a_2, a_3\}$. Let $Q$ be the number of arrangements for which $m = 5$. Find the remainder when $Q$ is divided by 1000.
Xem đáp án và lời giải
Đáp án: $360$
In an array with $m = 5$ rename all entries less than 5 as L and all entries greater than 5 as G. Then one row of the array will contain the entries L5G in some order. The other two rows will either contain entries LLL and GGG or contain entries LLG and LGG. In the first case there are $3! = 6$ ways to permute the L5G entries, 1 way to permute each of the LLL and GGG entries, and $3! = 6$ ways to permute the three rows of the array. In the second case there are 6 ways to permute the L5G entries, 3 ways to permute each of the LLG and LGG entries, and 6 ways to permute the three rows of the array. Thus there is a total of \[ 6 \cdot (3^2 + 1^2) \cdot 6 = 360 \] ways to arrange the four L, four G, and one 5 entries in an array with $m = 5$. For any one such array there are $4! = 24$ ways to replace the four L entries with $1, 2, 3$, and 4 and $4! = 24$ ways to replace the four G entries with $6, 7, 8$, and 9, so \[ Q = 360 \cdot 24^2 = 207{,}360. \] The requested remainder is 360.
For every $m \geqslant 2$, let $Q(m)$ be the least positive integer with the following property: For every $n \geqslant Q(m)$, there is always a perfect cube $k^3$ in the range $n < k^3 \leqslant m \cdot n$. Find the remainder when \[ \sum_{m=2}^{2017} Q(m) \] is divided by 1000.
Xem đáp án và lời giải
Đáp án: $59$
Each of the sets $\{2, 3, 4, 5, 6, 7\}$, $\{9, 10, \ldots, 24\}$, and $\{32, 33, \ldots, 62\}$ has the form $\{n+1, n+2, \ldots, m \cdot n\}$ and contains no perfect cubes. Thus $Q(7) > 1$, $Q(3) > 8$, and $Q(2) > 31$. For a given $m$ let $k$ be the greatest integer such that $k^3 \leqslant Q(m) - 1$ and $m \cdot (Q(m) - 1) < (k+1)^3$. It follows that $m k^3 + 1 \leqslant (k+1)^3$, so $(m-1)k^2 - 3k - 3 \leqslant 0$. Solving for $k$ and using the fact that $k$ is an integer yields \[ k \leqslant \left\lfloor \dfrac{3 + \sqrt{12m - 3}}{2m - 2} \right\rfloor. \] For $m = 2, 3, 4$, and $8$, it follows that $k \leqslant 3, 2, 1$, and $0$, respectively. Because $m \cdot (Q(m) - 1) < (k+1)^3$, it follows that $Q(2) < 33$, $Q(3) < 10$, $Q(4) < 3$, and $Q(8) < \dfrac{9}{8}$. By definition $Q(m) \geqslant Q(m+1) \geqslant 1$ for all $m$. Thus $Q(m) = 1$ for all $m \geqslant 8$. Also, $2 \leqslant Q(7) \leqslant Q(6) \leqslant Q(5) \leqslant Q(4) \leqslant 2$, so $Q(4) = Q(5) = Q(6) = Q(7) = 2$. Finally, $Q(3) = 9$ and $Q(2) = 32$. Therefore \[ \sum_{m=2}^{2017} Q(m) = 32 + 9 + 4 \cdot 2 + 2010 \cdot 1 = 2059. \] The requested remainder is 59.
Let $a > 1$ and $x > 1$ satisfy $\log_a (\log_a (\log_a 2) + \log_a 24 - 128) = 128$ and $\log_a (\log_a x) = 256$. Find the remainder when $x$ is divided by 1000.
Xem đáp án và lời giải
Đáp án: $896$
Simplify the first equation as follows: \[ \begin{aligned} \log_a (\log_a 2) + \log_a 24 - 128 &= a^{128} \\ \log_a (24 \log_a 2) &= 128 + a^{128} \\ \log_a (2^{24}) &= a^{128} \cdot a^{a^{128}} \\ 2^{24} &= a^{a^{128} \cdot a^{a^{128}}} \\ (2^3)^{(2^3)} &= (a^{a^{128}})^{(a^{a^{128}})}. \end{aligned} \] Thus $a^{a^{128}} = 2^3$. Letting $a = 2^{\frac{b}{128}}$ shows that $(2^{\frac{b}{128}})^{2^b} = 2^3$, which reduces to $3 \cdot 128 = b \cdot 2^b$. This implies that $b = 6$, so $a = 2^{\frac{3}{64}}$, and \[ x = a^{a^{256}} = (2^{\frac{3}{64}})^{2^{\left(\frac{3}{64} \cdot 256\right)}} = 2^{192}. \] Then $x \equiv 0 \pmod 8$. Euler's Theorem shows that $2^{192} \equiv 2^{-8} \equiv 256^{-1} \pmod{125}$. Because $3 \cdot 42 = 126 \equiv 1 \pmod{125}$, it follows that 128 and 42 are inverses mod 125. Thus 256 and 21 are inverses mod 125, so $x \equiv 21 \pmod{125}$. Because $x \equiv 0 \pmod 8$ and $x \equiv 21 \pmod{125}$, the Chinese Remainder Theorem implies that $x \equiv 896 \pmod{1000}$.
For each subset $T$ of $U = \{1, 2, 3, \dots, 18\}$, let $s(T)$ be the sum of the elements of $T$, with $s(\emptyset)$ defined to be $0$. If $T$ is chosen at random among all subsets of $U$, the probability that $s(T)$ is divisible by $3$ is $\dfrac{m}{n}$, where $m$ and $n$ are relatively prime positive integers. Find $m$.
Xem đáp án và lời giải
Đáp án: $683$
Partition $U$ into three sets of $6$ elements according to their residues modulo $3$: $$
\begin{aligned} A &= \{1, 4, 7, 10, 13, 16\} (\text{residue } 1), \\ B &= \{2, 5, 8, 11, 14, 17\} (\text{residue } 2), \\ C &= \{3, 6, 9, 12, 15, 18\} (\text{residue } 0). \end{aligned}
$$ The elements in $C$ have sum $\equiv 0 \pmod 3$, so choosing any subset of $C$ does not affect $s(T) \pmod 3$. Let $a = |T \cap A|$ and $b = |T \cap B|$. Then the sum modulo $3$ is \[ s(T) \equiv a(1) + b(2) \equiv a - b \pmod 3. \] Thus, $s(T)$ is divisible by $3$ if and only if $a \equiv b \pmod 3$. Since $0 \leqslant a, b \leqslant 6$, this occurs when $|a - b| \in \{0, 3, 6\}$. We use the roots of unity filter. Let $\omega = e^{2\pi i / 3}$. The generating function for subsets of $A \cup B$ weighted by $\omega^{s(T)}$ is \[ P(x) = (1 + x)^6 (1 + x^2)^6. \] Evaluating at $x = 1, \omega, \omega^2$: For $x = 1$: $P(1) = 2^6 \times 2^6 = 2^{12} = 4096$. For $x = \omega$: $1 + \omega = -\omega^2$, so $(1 + \omega)^6 = (-\omega^2)^6 = 1$. Similarly, $1 + \omega^2 = -\omega$, so $(1 + \omega^2)^6 = (-\omega)^6 = 1$. Thus $P(\omega) = 1 \times 1 = 1$. For $x = \omega^2$: by symmetry, $P(\omega^2) = 1$. By the multisection formula, the number of subsets of $A \cup B$ whose sum is divisible by $3$ is \[ \dfrac{P(1) + P(\omega) + P(\omega^2)}{3} = \dfrac{4096 + 1 + 1}{3} = \dfrac{4098}{3} = 1366. \] The total number of subsets of $A \cup B$ is $2^{12} = 4096$. Therefore, the probability is \[ \dfrac{1366}{4096} = \dfrac{683}{2048}. \] Since $683$ is prime, this fraction is in lowest terms. Thus $m = 683$.
For any positive integer $a$, $\sigma(a)$ denotes the sum of the positive integer divisors of $a$. Let $n$ be the least positive integer such that $\sigma(a^n) - 1$ is divisible by $2021$ for all positive integers $a$. Find the sum of the prime factors in the prime factorization of $n$.
Xem đáp án và lời giải
Đáp án: $125$
Note that $2021 = 43 \times 47$, where both $43$ and $47$ are prime numbers. By the multiplicative property of $\sigma$, if $a = p_1^{\alpha_1} p_2^{\alpha_2} \dots$, then: \[ \sigma(a^n) = \prod \sigma(p_i^{n\alpha_i}). \] For $\sigma(a^n) \equiv 1 \pmod{2021}$ to hold for all $a$, it is necessary and sufficient that for every prime $p$ and every $\alpha \geqslant 1$: \[ \sigma(p^{n\alpha}) = 1 + p + p^2 + \dots + p^{n\alpha} \equiv 1 \pmod{43} \text{ and } \pmod{47}. \] This means: \[ p(1 + p + \dots + p^{n\alpha - 1}) \equiv 0 \pmod{43} \text{ and } \pmod{47}. \] For primes $p \not\equiv 0 \pmod{43}$, multiplying by $p - 1$ gives $p^{n\alpha} - 1 \equiv 0 \pmod{43}$, so $p^{n\alpha} \equiv 1 \pmod{43}$. For this to hold for all $p \not\equiv 0 \pmod{43}$, the exponent $n$ must be a multiple of the order of every element in $\mathbb{F}_{43}^\times$ and $\mathbb{F}_{47}^\times$. Using primitive roots modulo $43$ and $47$: Modulo $43$: $n$ must be divisible by $43 - 1 = 42 = 2 \times 3 \times 7$, and by $43$. Modulo $47$: $n$ must be divisible by $47 - 1 = 46 = 2 \times 23$, and by $47$. Therefore, $n$ must be divisible by $lcm(42, 43, 46, 47)$: The prime factors that must divide $n$ are $2, 3, 7, 23, 43, 47$. The sum of these prime factors is: \[ 2 + 3 + 7 + 23 + 43 + 47 = 125. \]