[u]Round 1[/u]


[b]p1. [/b] What is the sum of the digits in the binary representation of $2023$?


[b]p2.[/b] Jack is buying fruits at the EMCCmart. Three apples and two bananas cost $\$11.00$. Five apples and four bananas cost $\$19.00$. In cents, how much more does an apple cost than a banana?


[b]p3.[/b] Define $a \sim b$ as $a! - ab$. What is $(4 \sim 5) \sim (5 \sim (3 \sim 1))$?


[u] Round 2[/u]


[b]p4.[/b] Alan has $24$ socks in his drawer. Of these socks, $4$ are red, $8$ are blue, and $12$ are green. Alan takes out socks one at a time from his drawer at random. What is the minimum number of socks he must pull out to guarantee that the number of green socks is at least twice the number of red socks?


[b]p5.[/b] What is the remainder when the square of the $24$th smallest prime number is divided by $24$?


[b]p6.[/b] A cube and a sphere have the same volume. If $k$ is the ratio of the length of the longest diagonal of the cube to the diameter of the sphere, find $k^6$.


[u]Round 3[/u]


[b]p7.[/b] Equilateral triangle $ABC$ has side length $3\sqrt3$. Point $D$ is drawn such that $BD$ is tangent to the circumcircle of triangle $ABC$ and $BD = 4$. Find the distance from the circumcenter of triangle $ABC$ to $D$.

[b]p8.[/b] If $\frac{2023!}{2^k}$ is an odd integer for an integer $k$, what is the value of $k$?


[b]p9.[/b] Let $S$ be a set of 6 distinct positive integers. If the sum of the three smallest elements of $S$ is $8$, and the sum of the three largest elements of $S$ is $19$, find the product of the elements in $S$.


[u]Round 4[/u]


[b]p10.[/b] For some integers $b$, the number $1 + 2b + 3b^2 + 4b^3 + 5b^4$ is divisible by $b + 1$. Find the largest possible value of $b$.


[b]p11.[/b] Let $a, b, c$ be the roots of cubic equation $x^3 + 7x^2 + 8x + 1$. Find $a^2 + b^2 + c^2 + \frac{1}{a} + \frac{1}{b} + \frac{1}{c}$


[b]p12.[/b] Let $C$ be the set of real numbers $c$ such that there are exactly two integers n satisfying $2c < n < 3c$. Find the expected value of a number chosen uniformly at random from $C$.


PS. You should use hide for answers. Rounds 5-8 have been posted [url=https://artofproblemsolving.com/community/c3h3131590p28370327]here[/url]. Collected [url=https://artofproblemsolving.com/community/c5h2760506p24143309]here[/url].
1. **Problem 1:**
   To find the sum of the digits in the binary representation of \(2023\), we first convert \(2023\) to binary.

   \[
   2023_{10} = 11111100111_2
   \]

   Next, we sum the digits of the binary number:

   \[
   1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + 1 + 1 + 1 = 9
   \]

   Therefore, the sum of the digits in the binary representation of \(2023\) is \(\boxed{9}\).

2. **Problem 2:**
   Let the cost of an apple be \(a\) dollars and the cost of a banana be \(b\) dollars. We are given the following system of equations:

   \[
   3a + 2b = 11
   \]
   \[
   5a + 4b = 19
   \]

   To eliminate \(b\), we multiply the first equation by \(-2\) and add it to the second equation:

   \[
   -2(3a + 2b) + (5a + 4b) = -2(11) + 19
   \]
   \[
   -6a - 4b + 5a + 4b = -22 + 19
   \]
   \[
   -a = -3 \implies a = 3
   \]

   Substituting \(a = 3\) back into the first equation:

   \[
   3(3) + 2b = 11
   \]
   \[
   9 + 2b = 11
   \]
   \[
   2b = 2 \implies b = 1
   \]

   Therefore, an apple costs \(3\) dollars and a banana costs \(1\) dollar. The difference in cost is:

   \[
   3 - 1 = 2 \text{ dollars} = 200 \text{ cents}
   \]

   Hence, an apple costs \(\boxed{200}\) cents more than a banana.

3. **Problem 3:**
   Define \(a \sim b\) as \(a! - ab\). We need to find \((4 \sim 5) \sim (5 \sim (3 \sim 1))\).

   First, calculate \(3 \sim 1\):

   \[
   3 \sim 1 = 3! - 3 \cdot 1 = 6 - 3 = 3
   \]

   Next, calculate \(5 \sim 3\):

   \[
   5 \sim 3 = 5! - 5 \cdot 3 = 120 - 15 = 105
   \]

   Then, calculate \(4 \sim 5\):

   \[
   4 \sim 5 = 4! - 4 \cdot 5 = 24 - 20 = 4
   \]

   Finally, calculate \(4 \sim 105\):

   \[
   4 \sim 105 = 4! - 4 \cdot 105 = 24 - 420 = -396
   \]

   Therefore, \((4 \sim 5) \sim (5 \sim (3 \sim 1)) = \boxed{-396}\).

4. **Problem 4:**
   Alan has 24 socks: 4 red, 8 blue, and 12 green. To guarantee that the number of green socks is at least twice the number of red socks, we consider the worst-case scenario where Alan picks all the non-green socks first.

   He could pick all 4 red and all 8 blue socks first:

   \[
   4 + 8 = 12 \text{ socks}
   \]

   After picking 12 socks, he must pick additional green socks. To ensure the number of green socks is at least twice the number of red socks (4 red socks), he needs at least:

   \[
   2 \times 4 = 8 \text{ green socks}
   \]

   Therefore, he needs to pick at least:

   \[
   12 + 8 = 20 \text{ socks}
   \]

   Hence, the minimum number of socks he must pull out is \(\boxed{20}\).

5. **Problem 5:**
   The 24th smallest prime number is 89. We need to find the remainder when \(89^2\) is divided by 24.

   First, calculate \(89 \mod 24\):

   \[
   89 \div 24 = 3 \text{ remainder } 17 \implies 89 \equiv 17 \pmod{24}
   \]

   Next, calculate \(17^2 \mod 24\):

   \[
   17^2 = 289
   \]
   \[
   289 \div 24 = 12 \text{ remainder } 1 \implies 289 \equiv 1 \pmod{24}
   \]

   Therefore, the remainder when \(89^2\) is divided by 24 is \(\boxed{1}\).

6. **Problem 6:**
   Let the side length of the cube be \(s\) and the radius of the sphere be \(r\). The volume of the cube and the sphere are equal:

   \[
   s^3 = \frac{4}{3} \pi r^3
   \]

   Solving for \(s\):

   \[
   s = \sqrt[3]{\frac{4 \pi}{3}} r
   \]

   The diameter of the sphere is \(2r\). The longest diagonal of the cube is:

   \[
   s\sqrt{3}
   \]

   The ratio \(k\) of the length of the longest diagonal of the cube to the diameter of the sphere is:

   \[
   k = \frac{s\sqrt{3}}{2r} = \frac{\sqrt[3]{\frac{4 \pi}{3}} r \sqrt{3}}{2r} = \frac{\sqrt{3} \cdot \sqrt[3]{\frac{4 \pi}{3}}}{2}
   \]

   We need to find \(k^6\):

   \[
   k^6 = \left( \frac{\sqrt{3} \cdot \sqrt[3]{\frac{4 \pi}{3}}}{2} \right)^6 = \frac{3^3 \cdot \left( \frac{4 \pi}{3} \right)^2}{2^6} = \frac{27 \cdot \frac{16 \pi^2}{9}}{64} = \frac{48 \pi^2}{64} = \frac{3 \pi^2}{4}
   \]

   Therefore, \(k^6 = \boxed{\frac{3 \pi^2}{4}}\).

7. **Problem 7:**
   Let \(O\) be the circumcenter of triangle \(ABC\). The circumradius \(R\) of an equilateral triangle with side length \(a\) is given by:

   \[
   R = \frac{a}{\sqrt{3}}
   \]

   For \(a = 3\sqrt{3}\):

   \[
   R = \frac{3\sqrt{3}}{\sqrt{3}} = 3
   \]

   Since \(BD\) is tangent to the circumcircle at \(B\) and \(BD = 4\), we use the Pythagorean theorem to find the distance from \(O\) to \(D\):

   \[
   OD = \sqrt{OB^2 + BD^2} = \sqrt{3^2 + 4^2} = \sqrt{9 + 16} = \sqrt{25} = 5
   \]

   Therefore, the distance from the circumcenter of triangle \(ABC\) to \(D\) is \(\boxed{5}\).

8. **Problem 8:**
   We need to find the largest \(k\) such that \(\frac{2023!}{2^k}\) is an odd integer. This is equivalent to finding the highest power of 2 that divides \(2023!\).

   Using Legendre's formula:

   \[
   \nu_2(2023!) = \left\lfloor \frac{2023}{2} \right\rfloor + \left\lfloor \frac{2023}{4} \right\rfloor + \left\lfloor \frac{2023}{8} \right\rfloor + \left\lfloor \frac{2023}{16} \right\rfloor + \left\lfloor \frac{2023}{32} \right\rfloor + \left\lfloor \frac{2023}{64} \right\rfloor + \left\lfloor \frac{2023}{128} \right\rfloor + \left\lfloor \frac{2023}{256} \right\rfloor + \left\lfloor \frac{2023}{512} \right\rfloor + \left\lfloor \frac{2023}{1024} \right\rfloor
   \]

   Calculating each term:

   \[
   \left\lfloor \frac{2023}{2} \right\rfloor = 1011
   \]
   \[
   \left\lfloor \frac{2023}{4} \right\rfloor = 505
   \]
   \[
   \left\lfloor \frac{2023}{8} \right\rfloor = 252
   \]
   \[
   \left\lfloor \frac{2023}{16} \right\rfloor = 126
   \]
   \[
   \left\lfloor \frac{2023}{32} \right\rfloor = 63
   \]
   \[
   \left\lfloor \frac{2023}{64} \right\rfloor = 31
   \]
   \[
   \left\lfloor \frac{2023}{128} \right\rfloor = 15
   \]
   \[
   \left\lfloor \frac{2023}{256} \right\rfloor = 7
   \]
   \[
   \left\lfloor \frac{2023}{512} \right\rfloor = 3
   \]
   \[
   \left\lfloor \frac{2023}{1024} \right\rfloor = 1
   \]

   Summing these values:

   \[
   \nu_2(2023!) = 1011 + 505 + 252 + 126 + 63 + 31 + 15 + 7 + 3 + 1 = 2014
   \]

   Therefore, the value of \(k\) is \(\boxed{2014}\).

9. **Problem 9:**
   Let \(S\) be a set of 6 distinct positive integers. The sum of the three smallest elements is 8, and the sum of the three largest elements is 19. We need to find the product of the elements in \(S\).

   Let the elements of \(S\) be \(a, b, c, d, e, f\) such that \(a < b < c < d < e < f\). Given:

   \[
   a + b + c = 8
   \]
   \[
   d + e + f = 19
   \]

   The smallest possible values for \(a, b, c\) are 1, 3, and 4 (since they must be distinct and positive):

   \[
   1 + 3 + 4 = 8
   \]

   The largest possible values for \(d, e, f\) are 5, 6, and 8:

   \[
   5 + 6 + 8 = 19
   \]

   Therefore, the set \(S\) is \(\{1, 3, 4, 5, 6, 8\}\). The product of the elements is:

   \[
   1 \cdot 3 \cdot 4 \cdot 5 \cdot 6 \cdot 8 = 2880
   \]

   Hence, the product of the elements in \(S\) is \(\boxed{2880}\).

10. **Problem 10:**
    We need to find the largest integer \(b\) such that \(1 + 2b + 3b^2 + 4b^3 + 5b^4\) is divisible by \(b + 1\).

    Using the Remainder Theorem, if \(P(b) = 1 + 2b + 3b^2 + 4b^3 + 5b^4\) is divisible by \(b + 1\), then \(P(-1) = 0\):

    \[
    P(-1) = 1 + 2(-1) + 3(-1)^2 + 4(-1)^3 + 5(-1)^4
    \]
    \[
    P(-1) = 1 - 2 + 3 - 4 + 5 = 3
    \]

    Since \(P(-1) = 3\), \(b + 1\) must be a divisor of 3. The possible values of \(b\) are:

    \[
    b + 1 = \pm 1, \pm 3 \implies b = 0, -2, 2
    \]

    The largest possible value of \(b\) is \(\boxed{2}\).

11. **Problem 11:**
    Let \(a, b, c\) be the roots of the cubic equation \(x^3 + 7x^2 + 8x + 1 = 0\). We need to find \(a^2 + b^2 + c^2 + \frac{1}{a} + \frac{1}{b} + \frac{1}{c}\).

    Using Vieta's formulas:

    \[
    a + b + c = -7
    \]
    \[
    ab + bc + ca = 8
    \]
    \[
    abc = -1
    \]

    We can express \(a^2 + b^2 + c^2\) as:

    \[
    a^2 + b^2 + c^2 = (a + b + c)^2 - 2(ab + bc + ca)
    \]
    \[
    a^2 + b^2 + c^2 = (-7)^2 - 2(8) = 49 - 16 = 33
    \]

    Next, we find \(\frac{1}{a} + \frac{1}{b} + \frac{1}{c}\):

    \[
    \frac{1}{a} + \frac{1}{b} + \frac{1}{c} = \frac{ab + bc + ca}{abc} = \frac{8}{-1} = -8
    \]

    Therefore:

    \[
    a^2 + b^2 + c^2 + \frac{1}{a} + \frac{1}{b} + \frac{1}{c} = 33 - 8 = 25
    \]

    Hence, the value is \(\boxed{25}\).

12. **Problem 12:**
    Let \(c\) be a real number such that there are exactly two integers \(n\) satisfying \(2c < n < 3c\). Let these integers be \(k\) and \(k+1\). We have:

    \[
    k - 1 < 2c < k \quad \text{and} \quad k + 1 < 3c < k + 2
    \]

    Solving for \(c\):

    \[
    \frac{k}{2} - \frac{1}{2} < c < \frac{k}{2}
    \]
    \[
    \frac{k + 1}{3} < c < \frac{k + 2}{3}
    \]

    For these intervals to overlap, we must have:

    \[
    \frac{k + 2}{3} > \frac{k}{2} - \frac{1}{2} \quad \text{and} \quad \frac{k}{2} > \frac{k + 1}{3}
    \]

    Solving these inequalities:

    \[
    \frac{k + 2}{3} > \frac{k}{2} - \frac{1}{2} \implies 2(k + 2) > 3k - 3 \implies 2k + 4 > 3k - 3 \implies k < 7
    \]
    \[
    \frac{k}{2} > \frac{k + 1}{3} \implies 3k > 2(k + 1) \implies 3k > 2k + 2 \implies k > 2
    \]

    Therefore, \(k\) can be 3, 4, 5, or 6. For each \(k\):

    \[
    k = 3 \implies \frac{4}{3} < c < \frac{3}{2}
    \]
    \[
    k = 4 \implies \frac{5}{3} < c < 2
    \]
    \[
    k = 5 \implies 2 < c < \frac{7}{3}
    \]
    \[
    k = 6 \implies \frac{5}{2} < c < \frac{8}{3}
    \]

    The expected value of \(c\) is the average of the midpoints of these intervals:

    \[
    \frac{1}{6} \left( \frac{\frac{4}{3} + \frac{3}{2}}{2} \right) + \frac{1}{3} \left( \frac{\frac{5}{3} + 2}{2} \right) + \frac{1}{3} \left( \frac{2 + \frac{7}{3}}{2} \right) + \frac{1}{6} \left( \frac{\frac{5}{2} + \frac{8}{3}}{2} \right)
    \]

    Calculating each term:

    \[
    \frac{\frac{4}{3} + \