[u]Round 6[/u]


[b]p16.[/b] Let $ABC$ be a triangle with $AB = 3$, $BC = 4$, and $CA = 5$. There exist two possible points $X$ on $CA$ such that if $Y$ and $Z$ are the feet of the perpendiculars from $X$ to $AB$ and $BC,$ respectively, then the area of triangle $XY Z$ is $1$. If the distance between those two possible points can be expressed as  $\frac{a\sqrt{b}}{c}$ for positive integers $a$, $b$, and $c$ with $b$ squarefree and $gcd(a, c) = 1$, then find $a +b+ c$. 


[b]p17.[/b] Let $f(n)$ be the number of orderings of $1,2, ... ,n$ such that each number is as most twice the number preceding it. Find the number of integers $k$ between $1$ and $50$, inclusive, such that $f (k)$ is a perfect square. 


[b]p18.[/b] Suppose that $f$ is a function on the positive integers such that $f(p) = p$ for any prime p, and that $f (xy) = f(x) + f(y)$ for any positive integers $x$ and $y$. Define $g(n) = \sum_{k|n} f (k)$; that is, $g(n)$ is the sum of all $f(k)$ such that $k$ is a factor of $n$.  For example, $g(6) = f(1) + 1(2) + f(3) + f(6)$. Find the sum of all composite $n$ between $50$ and $100$, inclusive, such that $g(n) = n$. 


[u]Round 7[/u]

 
[b]p19.[/b] AJ is standing in the center of an equilateral triangle with vertices labelled $A$, $B$, and $C$. They begin by moving to one of the vertices and recording its label; afterwards, each minute, they move to a different vertex and record its label. Suppose that they record $21$ labels in total, including the initial one. Find the number of distinct possible ordered triples $(a, b, c)$, where a is the number of $A$'s they recorded, b is the number of $B$'s they recorded, and c is the number of $C$'s they recorded. 


[b]p20.[/b] Let $S = \sum_{n=1}^{\infty} (1- \{(2 + \sqrt3)^n\})$, where $\{x\} = x - \lfloor x\rfloor$ , the fractional part of $x$. If $S =\frac{\sqrt{a} -b}{c}$ for positive integers $a, b, c$ with $a $ squarefree, find $a + b + c$. 


[b]p21.[/b] Misaka likes coloring. For each square of a $1\times 8$ grid, she flips a fair coin and colors in the square if it lands on heads. Afterwards, Misaka places as many $1 \times 2$ dominos on the grid as possible such that both parts of each domino lie on uncolored squares and no dominos overlap. Given that the expected number of dominos that she places can be written as $\frac{a}{b}$, for positive integers $a$ and $b$ with $gcd(a, b) = 1$, find $a + b$. 


PS. You should use hide for answers. Rounds 1-3 have been posted [url=https://artofproblemsolving.com/community/c4h3131401p28368159]here [/url] and 4-5 [url=https://artofproblemsolving.com/community/c4h3131422p28368457]here[/url]. Collected [url=https://artofproblemsolving.com/community/c5h2760506p24143309]here[/url].
1. Let us construct a desired order of \(1, 2, 3, \ldots, n\) from a desired ordering of \(1, 2, 3, \ldots, n-1\). Note that we can insert an \(n\) behind any of the numbers 
   \[
   \left\lceil \frac{n}{2} \right\rceil, \left\lceil \frac{n}{2} \right\rceil + 1, \ldots, n-1,
   \]
   or at the front of the line. Therefore, it follows that 
   \[
   f(n) = \left(\left\lfloor \frac{n}{2} \right\rfloor + 1 \right) f(n-1) \quad \forall \quad n \in \mathbb{Z}_{\geq 2}.
   \]
2. Also, note that \(f(1) = 1\). Hence, we have 
   \[
   f(n) = \prod_{i=2}^{n} \left(\left\lfloor \frac{i}{2} \right\rfloor + 1 \right) \quad \forall \quad n \in \mathbb{Z}_{\geq 2}.
   \]
3. Since 
   \[
   \left\lfloor \frac{n}{2} \right\rfloor = \left\lfloor \frac{n+1}{2} \right\rfloor \quad \forall \quad \text{even } n,
   \]
   it follows that \(f(n)\) is a perfect square if and only if either \(n\) is odd or 
   \[
   \left\lfloor \frac{n}{2} \right\rfloor + 1
   \]
   is a perfect square.
4. In the former case, there are \(25\) such \(n\), in the latter case, there are \(9\) such \(n\) (they are \(1, 6, 7, 16, 17, 30, 31, 48,\) and \(49\)), and in both cases there are \(5\) such \(n\) (they are \(1, 7, 17, 31, 49\)), so the answer is 
   \[
   25 + 9 - 5 = \boxed{29}.
   \]