Navvye/Olympiad-Problems-CSV huggingface dataset:
Problem: Let $f(x)=ax^2+bx+c$ , where $a$ $b$ , and $c$ are integers. Suppose that $f(1)=0$ $50<f(7)<60$ $70<f(8)<80$ $5000k<f(100)<5000(k+1)$ for some integer $k$ . What is $k$
$\textbf{(A)}\ 1 \qquad \textbf{(B)}\ 2 \qquad \textbf{(C)}\ 3 \qquad \textbf{(D)}\ 4 \qquad \textbf{(E)}\ 5$

Solution: So we know that $a,b,c$ are integers so we can use this to our advantage
$\quad$
Using $f(1)=0$ , we get the equation $a+b+c=0$ and $f(7)=49a+7b+c=5X$ where $X$ is a decimal digit placeholder. (Ex. $X=2$ provides the value $52$
$\quad$
Solving for $b$ using the system of equations, we get $48a+6b=5X$ $\implies$ $b=-8a+ \frac{5X}{6}$
$\quad$
Since we know that $a$ and $b$ are both integers, we know that $\frac{5X}{6}$ $\in$ $\mathbb{Z}$ $\implies$ $X=4$ and by extension $b=-8a+9$
$\quad$
Attempting to solve for $b$ again using the system $f(8)=64a+8b+c=7Y$ $Y$ is another decimal digit placeholder), $f(1)=a+b+c=0$ gives us $b=-9a+ \frac{7Y}{7}$ $\implies$ $Y=7$ $\implies$ $b=-9a+11$
$\quad$
This leads to $-8a+9=-9a+11$ $\implies$ $a=2$ $\implies$ $b=-7$
$\quad$
Plugging in the values of $a$ and $b$ into $f(1)=a+b+c=0$ , we get $c=5$
$\quad$
Substituting the values of $a,b,c$ into $f(100)=10000a+100b+c$ , we get $f(100)=19305$ and $5000k<19305<5000(k+1)$ $\implies$ $k=3$ $\implies$ $\boxed{3}$

Answer: C 3
Problem: Let $f_{1}(x)=\sqrt{1-x}$ , and for integers $n \geq 2$ , let $f_{n}(x)=f_{n-1}(\sqrt{n^2 - x})$ . If $N$ is the largest value of $n$ for which the domain of $f_{n}$ is nonempty, the domain of $f_{N}$ is $[c]$ . What is $N+c$
$\textbf{(A)}\ -226 \qquad \textbf{(B)}\ -144 \qquad \textbf{(C)}\ -20 \qquad \textbf{(D)}\ 20 \qquad \textbf{(E)}\ 144$

Solution: The domain of $f_{1}(x)=\sqrt{1-x}$ is defined when $x\leq1$ \[f_{2}(x)=f_{1}\left(\sqrt{4-x}\right)=\sqrt{1-\sqrt{4-x}}\]
Applying the domain of $f_{1}(x)$ and the fact that square roots must be positive, we get $0\leq\sqrt{4-x}\leq1$ . Simplifying, the domain of $f_{2}(x)$ becomes $3\leq x\leq4$
Repeat this process for $f_{3}(x)=\sqrt{1-\sqrt{4-\sqrt{9-x}}}$ to get a domain of $-7\leq x\leq0$
For $f_{4}(x)$ , since square roots must be nonnegative, we can see that the negative values of the previous domain will not work, so $\sqrt{16-x}=0$ . Thus we now arrive at $16$ being the only number in the of domain of $f_4 x$ that defines $x$ . However, since we are looking for the largest value for $n$ for which the domain of $f_{n}$ is nonempty, we must continue checking until we arrive at a domain that is empty.
We continue with $f_{5}(x)$ to get a domain of $\sqrt{25-x}=16 \implies x=-231$ . Since square roots cannot be negative, this is the last nonempty domain. We add to get $5-231=\boxed{226}$

Answer: A 226
Problem: Triangle $ABC$ has $\angle BAC = 60^{\circ}$ $\angle CBA \leq 90^{\circ}$ $BC=1$ , and $AC \geq AB$ . Let $H$ $I$ , and $O$ be the orthocenter, incenter, and circumcenter of $\triangle ABC$ , respectively. Assume that the area of pentagon $BCOIH$ is the maximum possible. What is $\angle CBA$
$\textbf{(A)}\ 60^{\circ} \qquad \textbf{(B)}\ 72^{\circ} \qquad \textbf{(C)}\ 75^{\circ} \qquad \textbf{(D)}\ 80^{\circ} \qquad \textbf{(E)}\ 90^{\circ}$

Solution: Let $\angle CAB=A$ $\angle ABC=B$ $\angle BCA=C$ for convenience.
It's well-known that $\angle BOC=2A$ $\angle BIC=90+\frac{A}{2}$ , and $\angle BHC=180-A$ (verifiable by angle chasing). Then, as $A=60$ , it follows that $\angle BOC=\angle BIC=\angle BHC=120$ and consequently pentagon $BCOIH$ is cyclic. Observe that $BC=1$ is fixed, hence the circumcircle of cyclic pentagon $BCOIH$ is also fixed. Similarly, as $OB=OC$ (both are radii), it follows that $O$ and also $[BCO]$ is fixed. Since $[BCOIH]=[BCO]+[BOIH]$ is maximal, it suffices to maximize $[BOIH]$
Verify that $\angle IBC=\frac{B}{2}$ $\angle HBC=90-C$ by angle chasing; it follows that $\angle IBH=\angle HBC-\angle IBC=90-C-\frac{B}{2}=\frac{A}{2}-\frac{C}{2}=30-\frac{C}{2}$ since $A+B+C=180\implies\frac{A}{2}+\frac{B}{2}+\frac{C}{2}=90$ by Triangle Angle Sum. Similarly, $\angle OBC=(180-120)/2=30$ (isosceles base angles are equal), hence \[\angle IBO=\angle IBC-\angle OBC=\frac{B}{2}-30=60-\frac{A}{2}-\frac{C}{2}=30-\frac{C}{2}\] Since $\angle IBH=\angle IBO$ $IH=IO$ by Inscribed Angles.
There are two ways to proceed.
Letting $O'$ and $R$ be the circumcenter and circumradius, respectively, of cyclic pentagon $BCOIH$ , the most straightforward is to write $[BOIH]=[OO'I]+[IO'H]+[HO'B]-[BO'O]$ , whence \[[BOIH]=\frac{1}{2}R^2(\sin(60-C)+\sin(60-C)+\sin(2C-60)-\sin(60))\] and, using the fact that $R$ is fixed, maximize $2\sin(60-C)+\sin(2C-60)$ with Jensen's Inequality.
A more elegant way is shown below.
Lemma: $[BOIH]$ is maximized only if $HB=HI$
Proof by contradiction: Suppose $[BOIH]$ is maximized when $HB\neq HI$ . Let $H'$ be the midpoint of minor arc $BI$ be and $I'$ the midpoint of minor arc $H'O$ . Then $[BOIH']=[IBO]+[IBH']>[IBO]+[IBH]=[BOIH]$ since the altitude from $H'$ to $BI$ is greater than that from $H$ to $BI$ ; similarly $[BH'I'O]>[BOIH']>[BOIH]$ . Taking $H'$ $I'$ to be the new orthocenter, incenter, respectively, this contradicts the maximality of $[BOIH]$ , so our claim follows. $\blacksquare$
With our lemma( $HB=HI$ ) and $IH=IO$ from above, along with the fact that inscribed angles that intersect the same length chords are equal, \[\angle ABC=2\angle IBC=2(\angle OBC+\angle OBI)=2(30+\frac{1}{3}\angle OCB)=80\implies\boxed{80}\]

Answer: D 80
Problem: Josanna's test scores to date are $90, 80, 70, 60,$ and $85.$ Her goal is to raise her test average at least $3$ points with her next test. What is the minimum test score she would need to accomplish this goal?
$\textbf{(A)}\ 80 \qquad \textbf{(B)}\ 82 \qquad \textbf{(C)}\ 85 \qquad \textbf{(D)}\ 90 \qquad \textbf{(E)}\ 95$

Solution: Take the average of her current test scores, which is \[\frac{90+80+70+60+85}{5} = \frac{385}{5} = 77\]
This means that she wants her test average after the sixth test to be $80.$ Let $x$ be the score that Josanna receives on her sixth test. Thus, our equation is
\[\frac{90+80+70+60+85+x}{6} = 80\]
\[385+x = 480\]
\[x = \boxed{95}\]

Answer: E 95
Problem: LeRoy and Bernardo went on a week-long trip together and agreed to share the costs equally. Over the week, each of them paid for various joint expenses such as gasoline and car rental. At the end of the trip it turned out that LeRoy had paid A dollars and Bernardo had paid B dollars, where $A < B.$ How many dollars must LeRoy give to Bernardo so that they share the costs equally?
$\textbf{(A)}\ \frac{A+B}{2} \qquad \textbf{(B)}\ \frac{A-B}{2} \qquad \textbf{(C)}\ \frac{B-A}{2} \qquad \textbf{(D)}\ B-A \qquad \textbf{(E)}\ A+B$

Solution: The total amount of money that was spent during the trip was \[A + B\] So each person should pay \[\frac{A+B}{2}\] if they were to share the costs equally. Because LeRoy has already paid $A$ dollars of his part, he still has to pay \[\frac{A+B}{2} - A =\] \[= \boxed{2}\]

Answer: C 2
Problem: In multiplying two positive integers $a$ and $b$ , Ron reversed the digits of the two-digit number $a$ . His erroneous product was $161.$ What is the correct value of the product of $a$ and $b$
$\textbf{(A)}\ 116 \qquad \textbf{(B)}\ 161 \qquad \textbf{(C)}\ 204 \qquad \textbf{(D)}\ 214 \qquad \textbf{(E)}\ 224$

Solution: Taking the prime factorization of $161$ reveals that it is equal to $23*7.$ Therefore, the only ways to represent $161$ as a product of two positive integers is $161*1$ and $23*7.$ Because neither $161$ nor $1$ is a two-digit number, we know that $a$ and $b$ are $23$ and $7.$ Because $23$ is a two-digit number, we know that a, with its two digits reversed, gives $23.$ Therefore, $a = 32$ and $b = 7.$ Multiplying our two correct values of $a$ and $b$ yields
\[a*b = 32*7 =\]
\[= \boxed{224}\]

Answer: E 224
Problem: Let $N$ be the second smallest positive integer that is divisible by every positive integer less than $7$ . What is the sum of the digits of $N$
$\textbf{(A)}\ 3 \qquad \textbf{(B)}\ 4 \qquad \textbf{(C)}\ 5 \qquad \textbf{(D)}\ 6 \qquad \textbf{(E)}\ 9$

Solution: $N$ must be divisible by every positive integer less than $7$ , or $1, 2, 3, 4, 5,$ and $6$ . Each number that is divisible by each of these is a multiple of their least common multiple. $LCM(1,2,3,4,5,6)=60$ , so each number divisible by these is a multiple of $60$ . The smallest multiple of $60$ is $60$ , so the second smallest multiple of $60$ is $2\times60=120$ . Therefore, the sum of the digits of $N$ is $1+2+0=\boxed{3}$

Answer: A 3
Problem: Two tangents to a circle are drawn from a point $A$ .  The points of contact $B$ and $C$ divide the circle into arcs with lengths in the ratio $2 : 3$ .  What is the degree measure of $\angle{BAC}$
$\textbf{(A)}\ 24 \qquad \textbf{(B)}\ 30 \qquad \textbf{(C)}\ 36 \qquad \textbf{(D)}\ 48 \qquad \textbf{(E)}\ 60$

Solution: In order to solve this problem, use of the tangent-tangent intersection theorem (Angle of intersection between two tangents dividing a circle into arc length A and arc length B = 1/2 (Arc A° - Arc B°).
In order to utilize this theorem, the degree measures of the arcs must be found.  First, set A (Arc length A) equal to 3d, and B (Arc length B) equal to 2d.
Setting 3d+2d = 360° will find d = 72°, and so therefore Arc length A in degrees will equal 216° and arc length B will equal 144°.
Finally, simply plug the two arc lengths into the tangent-tangent intersection theorem, and the answer:
1/2 (216°-144°) = 1/2 (72°) $=\boxed{36}.$

Answer: C 36
Problem: Two tangents to a circle are drawn from a point $A$ .  The points of contact $B$ and $C$ divide the circle into arcs with lengths in the ratio $2 : 3$ .  What is the degree measure of $\angle{BAC}$
$\textbf{(A)}\ 24 \qquad \textbf{(B)}\ 30 \qquad \textbf{(C)}\ 36 \qquad \textbf{(D)}\ 48 \qquad \textbf{(E)}\ 60$

Solution: Let arc A be 3x and arc B be 2x. Then the angle formed by the tangents is $\frac{3x-2x}2 = \frac {x} 2$ by the arc length formula. Also note that $3x + 2x = 360$ , which simplifies to $x= 72.$ Hence the angle formed by the tangents is equal to $\boxed{36}$

Answer: C 36
Problem: Two tangents to a circle are drawn from a point $A$ .  The points of contact $B$ and $C$ divide the circle into arcs with lengths in the ratio $2 : 3$ .  What is the degree measure of $\angle{BAC}$
$\textbf{(A)}\ 24 \qquad \textbf{(B)}\ 30 \qquad \textbf{(C)}\ 36 \qquad \textbf{(D)}\ 48 \qquad \textbf{(E)}\ 60$

Solution: Let the center of the circle be $O$ . The radii extending from $O$ to the points of tangency $B$ and $C$ are both perpendicular to lines $AB$ and $AC$ . Thus $\angle ABO = \angle ACO = 90^{\circ}$ , and quadrilateral $ABOC$ is cyclic, since the opposite angles add to $180^{\circ}$
Since the ratio of the arc lengths is $2 : 3$ , the shorter arc (the arc cut off by $\angle BOC$ ) is $144^{\circ}$
$\angle BOC$ and $\angle BAC$ must add up to $180^{\circ}$ since quadrilateral $ABOC$ is cyclic, so $\angle BAC = 180 - 144 = \boxed{36}$

Answer: C 36
Problem: Keiko walks once around a track at the same constant speed every day.  The sides of the track are straight, and the ends are semicircles.  The track has a width of $6$ meters, and it takes her $36$ seconds longer to walk around the outside edge of the track than around the inside edge.  What is Keiko's speed in meters per second?
$\textbf{(A)}\ \frac{\pi}{3} \qquad \textbf{(B)}\ \frac{2\pi}{3} \qquad \textbf{(C)}\ \pi \qquad \textbf{(D)}\  \frac{4\pi}{3} \qquad \textbf{(E)}\  \frac{5\pi}{3}$

Solution: To find Keiko's speed, all we need to find is the difference between the distance around the inside edge of the track and the distance around the outside edge of the track, and divide it by the difference in the time it takes her for each distance.  We are given the difference in time, so all we need to find is the difference between the distances.
The track is divided into lengths and curves.  The lengths of the track will exhibit no difference in distance between the inside and outside edges, so we only need to concern ourselves with the curves.
The curves of the track are semicircles, but since there are two of them, we can consider both of the at the same time by treating them as a single circle.  We need to find the difference in the circumferences of the inside and outside edges of the circle.
The formula for the circumference of a circle is $C = 2 * \pi * r$ where $r$ is the radius of the circle.
Let's define the circumference of the inside circle as $C_1$ and the circumference of the outside circle as $C_2$
If the radius of the inside circle ( $r_1$ ) is $n$ , then given the thickness of the track is 6 meters, the radius of the outside circle ( $r_2$ ) is $n + 6$
Using this, the difference in the circumferences is:
$C_2 - C_1 = 2 * \pi * (r_2 - r_1) = 2 * \pi * (n + 6 - n) = 2 * \pi * 6 = 12\pi$
$12\pi$ is the difference between the inside and outside lengths of the track.  Divided by the time differential, we get:
$12\pi \div 36 = \boxed{3}$

Answer: A 3
Problem: Rectangle $ABCD$ has $AB=6$ and $BC=3$ . Point $M$ is chosen on side $AB$ so that $\angle AMD=\angle CMD$ . What is the degree measure of $\angle AMD$
$\textrm{(A)}\ 15 \qquad \textrm{(B)}\ 30 \qquad \textrm{(C)}\ 45 \qquad \textrm{(D)}\ 60 \qquad \textrm{(E)}\ 75$

Solution: Since $AB \parallel CD$ $\angle AMD = \angle CDM$ , so $\angle AMD = \angle CMD = \angle CDM$ , so $\bigtriangleup CMD$ is isosceles, and hence $CM=CD=6$ .  Therefore, $\angle BMC = 30^\circ$ .  Therefore $\angle AMD=\boxed{75}$

Answer: E 75
Problem: A frog located at $(x,y)$ , with both $x$ and $y$ integers, makes successive jumps of length $5$ and always lands on points with integer coordinates. Suppose that the frog starts at $(0,0)$ and ends at $(1,0)$ . What is the smallest possible number of jumps the frog makes?
$\textbf{(A)}\ 2 \qquad \textbf{(B)}\ 3 \qquad \textbf{(C)}\ 4 \qquad \textbf{(D)}\ 5 \qquad \textbf{(E)}\ 6$

Solution: Since the frog always jumps in length $5$ and lands on a lattice point, the sum of its coordinates must change either by $5$ (by jumping parallel to the x- or y-axis), or by $3$ or $4$ (3-4-5 right triangle).
Because either $1$ $5$ , or $7$ is always the change of the sum of the coordinates, the sum of the coordinates will always change from odd to even or vice versa. Thus, it can't go from $(0,0)$ to $(1,0)$ in an even number of moves. Therefore, the frog cannot reach $(1,0)$ in two moves.
However, a path is possible in 3 moves:  from $(0,0)$ to $(3,4)$ to $(6,0)$ to $(1,0)$
Thus, the answer is $= \boxed{3}$

Answer:  3
Problem: Brian writes down four integers $w > x > y > z$ whose sum is $44$ . The pairwise positive differences of these numbers are $1, 3, 4, 5, 6$ and $9$ . What is the sum of the possible values of $w$
$\textbf{(A)}\ 16 \qquad \textbf{(B)}\ 31 \qquad \textbf{(C)}\ 48 \qquad \textbf{(D)}\ 62 \qquad \textbf{(E)}\ 93$

Solution: Assume that $y-z=a, x-y=b, w-x=c.$ $w-z$ results in the greatest pairwise difference, and thus it is $9$ . 
This means $a+b+c=9$ $a,b,c$ must be in the set ${1,3,4,5,6}$ .
The only way for 3 numbers in the set to add up to 9 is if they are $1,3,5$ $a+b$ , and $b+c$ then must be the remaining two numbers which are $4$ and $6$ .
The ordering of $(a,b,c)$ must be either $(3,1,5)$ or $(5,1,3)$
\begin{align*} z + (z + a) + (z + (a + b)) + (z + (a + b + c)) &= 4z + a + (a + b) + 9\\ 4z + a + (a + b) + 9 &= 44\\ \text{if} \hspace{1cm} a &= 3 \\ a + b &= 4\\ 4z &= 44 - 9 - 3 - 4\\ z &= 7\\ w &= 16\\ \end{align*}
\begin{align*} \text{if} \hspace{1cm} a &= 5\\ a + b &= 6\\ 4z &= 44 - 9 - 5 - 6\\ z &= 6\\ w &= 15\\ \end{align*}
The sum of the two w's is $15+16=31$ $\boxed{31}$

Answer: B 31
Problem: Brian writes down four integers $w > x > y > z$ whose sum is $44$ . The pairwise positive differences of these numbers are $1, 3, 4, 5, 6$ and $9$ . What is the sum of the possible values of $w$
$\textbf{(A)}\ 16 \qquad \textbf{(B)}\ 31 \qquad \textbf{(C)}\ 48 \qquad \textbf{(D)}\ 62 \qquad \textbf{(E)}\ 93$

Solution: Let the four numbers be $z$ $z+a$ $z+b$ , and $z+c$ . We know that $c$ must be $9$ because that's the greatest difference. So we have $z$ $z+a$ $z+b$ , and $z+9$ . The 6 possible differences are $a$ $b$ $9$ $b-a$ $9-a$ , and $9-b$ . We are given that the differences are 1, 3, 4, 5, 6, 9. $a$ and $9-a$ and $b$ and $9-b$ add to 9 which means they have to be 4, 5 and 3,6 or vice versa. Which leaves $1$ . That means $b-a$ has to equal $1$ . So an and b have to be 3,4, 4,5, or 5,6. For 3,4, we have $z$ $z+3$ $z+4$ , and $z+9$ $4z+16=44$ $4z=28$ $z=7$ $w=7+9=16$ . Now for 4,5, notice that it doesn't work. The differences are 4, 5, 9, 1, 4, 5. We are missing 6 and 3. For 5,6, it's $z$ $z+5$ $z+6$ , and $z+9$ . Check that the differences work; they do. We have $4z+20=44$ $4z=24$ $z=6$ $w=6+9=15$ . Therefore our answer is $15+16=\boxed{31}$ .
~MC413551

Answer:  31
Problem: How many positive two-digit integers are factors of $2^{24}-1$
$\textbf{(A)}\ 4 \qquad \textbf{(B)}\ 8 \qquad \textbf{(C)}\ 10 \qquad \textbf{(D)}\ 12 \qquad \textbf{(E)}\ 14$
~ pi_is_3.14

Solution: Repeating difference of squares
$2^{24}-1=(2^{12}+1)(2^{6}+1)(2^{3}+1)(2^{3}-1)$
$2^{24}-1=(2^{12}+1)\cdot65\cdot9\cdot7$
$2^{24}-1 = (2^{12} +1) * 5 * 13 * 3^2 * 7$
The sum of cubes formula gives us:
$2^{12}+1=(2^4+1)(2^8-2^4+1)$
$2^{12}+1 = 17\cdot241$
A quick check shows $241$ is prime. Thus, the only factors to be concerned about are $3^2\cdot5\cdot7\cdot13\cdot17$ , since multiplying by $241$ will make any factor too large.
Multiplying $17$ by $3$ or $5$ will give a two-digit factor; $17$ itself will also work. The next smallest factor, $7$ , gives a three-digit number.  Thus, there are $3$ factors that are multiples of $17$
Multiplying $13$ by $3$ $5$ , or $7$ will also give a two-digit factor, as well as $13$ itself. Higher numbers will not work, giving $4$ additional factors.
Multiply $7$ by $3$ $5$ , or $3^2$ for a two-digit factor. There are no more factors to check, as all factors which include $13$ are already counted. Thus, there are an additional $3$ factors.
Multiply $5$ by $3$ or $3^2$ for a two-digit factor. All higher factors have been counted already, so there are $2$ more factors.
Thus, the total number of factors is $3+4+3+2=\boxed{12}$

Answer: D 12
Problem: Let $f(x) = 10^{10x}, g(x) = \log_{10}\left(\frac{x}{10}\right), h_1(x) = g(f(x))$ , and $h_n(x) = h_1(h_{n-1}(x))$ for integers $n \geq 2$ . What is the sum of the digits of $h_{2011}(1)$
$\textbf{(A)}\ 16081 \qquad \textbf{(B)}\ 16089 \qquad \textbf{(C)}\ 18089 \qquad \textbf{(D)}\ 18098 \qquad \textbf{(E)}\ 18099$

Solution: $g(x)=\log_{10}\left(\frac{x}{10}\right)=\log_{10}\left({x}\right) - 1$
$h_{1}(x)=g(f(x))\text{ = }g(10^{10x}=\log_{10}\left({10^{10x}}\right){ - 1 = 10x - 1}$
Proof by induction that $h_{n}(x)\text{ = }10^n x - (1 + 10 + 10^2 + ... + 10^{n-1})$
For $n=1$ $h_{1}(x)=10x - 1$
Assume $h_{n}(x)=10^n x - (1 + 10 + 10^2 + ... + 10^{n-1})$ is true for n:
\begin{align*} h_{n+1}(x)&= h_{1}(h_{n}(x))\\ &=10 h_{n}(x) - 1\\ &=10 (10^n x   - (1 + 10 + 10^2 + ... + 10^{n-1})) - 1\\ &= 10^{n+1} x - (10 + 10^2 + ... + 10^{n}) - 1\\ &= 10^{n+1} x - (1 + 10 + 10^2 + ... + 10^{(n+1)-1}) \end{align*}
Therefore, if it is true for n, then it is true for n+1; since it is also true for n = 1, it is true for all positive integers n.
$h_{2011}(1) = 10^{2011}\times 1{ - }(1 + 10 + 10^2 + ... + 10^{2010})$ , which is the 2011-digit number 8888...8889
The sum of the digits is 8 times 2010 plus 9, or $\boxed{16089}$

Answer: B 16089
Problem: Let $f(x) = 10^{10x}, g(x) = \log_{10}\left(\frac{x}{10}\right), h_1(x) = g(f(x))$ , and $h_n(x) = h_1(h_{n-1}(x))$ for integers $n \geq 2$ . What is the sum of the digits of $h_{2011}(1)$
$\textbf{(A)}\ 16081 \qquad \textbf{(B)}\ 16089 \qquad \textbf{(C)}\ 18089 \qquad \textbf{(D)}\ 18098 \qquad \textbf{(E)}\ 18099$

Solution: As before, $h_1(x)=10x-1$ . Compute $h_1(x)$ $h_2(x)$ , and $h_3(x)$ to yield 9, 89, and 889. Notice how this trend will repeat this trend (multiply by 10, subtract 1, repeat). As such, $h_{2011}$ is just 2010 8's followed by a nine. $2010(8)+9=\boxed{16089}$

Answer: B 16089
Problem: A bug travels in the coordinate plane, moving only along the lines that are parallel to the $x$ -axis or $y$ -axis. Let $A = (-3, 2)$ and $B = (3, -2)$ . Consider all possible paths of the bug from $A$ to $B$ of length at most $20$ . How many points with integer coordinates lie on at least one of these paths?
$\textbf{(A)}\ 161 \qquad \textbf{(B)}\ 185 \qquad \textbf{(C)}\  195 \qquad \textbf{(D)}\  227 \qquad \textbf{(E)}\  255$

Solution: We declare a point $(x, y)$ to make up for the extra steps that the bug has to move. If the point $(x, y)$ satisfies the property that $|x - 3| + |y + 2| + |x + 3| + |y - 2| \le 20$ , then it is in the desirable range because $|x - 3| + |y + 2|$ is the length of the shortest path from $(x,y)$ to $(3, -2)$ and $|x + 3| + |y - 2|$ is the length of the shortest path from $(x,y)$ to $(-3, 2)$
If $-3\le x \le 3$ , then $-7\le y \le 7$ satisfy the property. there are $15 \times 7 = 105$ lattice points here.
else let $3< x \le 8$ (and for $-8 \le x < -3$ because it is symmetrical) We set 8 as the upper bound for x because the shortest distance from $(-3, 2)$ to $(x, y)$ added to the shortest distance from $(x, y)$ to $(3, -2)$ is $|x - 3| + |y + 2| + |x + 3| + |y - 2|$ . Since the minimum value for the difference between the y-coordinates is at $y = 0$ , we get $2x + 4 = 20$ or $-2x + 4 = 20$ . Thus, the upper and lower bounds for $x$ are $8$ and $-8$ , respectively.
Now we test each value for x satisfying $3< x \le 8$ and double the result because of symmetry.
For $x = 4$ , the possibles values of y are such that $|2y| \le 12$ for a total of $13$ lattice points,
for $x = 5$ , the possibles values of y are such that $|2y| \le 10$ for a total of $11$ lattice points,
for $x = 6$ , the possibles values of y are such that $|2y| \le 8$ for a total of $9$ lattice points,
for $x = 7$ , the possibles values of y are such that $|2y| \le 6$ for a total of $7$ lattice points,
for $x = 8$ , the possibles values of y are such that $|2y| \le 4$ for a total of $5$ lattice points,
Hence, there are a total of $105 + 2 ( 13 + 11 + 9 + 7 + 5) = \boxed{195}$ lattice points.

Answer: C 195
Problem: A bug travels in the coordinate plane, moving only along the lines that are parallel to the $x$ -axis or $y$ -axis. Let $A = (-3, 2)$ and $B = (3, -2)$ . Consider all possible paths of the bug from $A$ to $B$ of length at most $20$ . How many points with integer coordinates lie on at least one of these paths?
$\textbf{(A)}\ 161 \qquad \textbf{(B)}\ 185 \qquad \textbf{(C)}\  195 \qquad \textbf{(D)}\  227 \qquad \textbf{(E)}\  255$

Solution: (Anyone mind making a diagram for this)
Notice that the bug is basically moving from A to B (length 10) but going on a detour in the middle.
Specifically the detour would be of length 5 to some point and then going back by retracing its path (also length 5). Just to simplify things we can observe that the coordinates don't matter here and all we need to remember is that A and B are the diagonally opposite vertices of a 4 by 6 rectangle. The bug can start the "detour" from any point on or inside the rectangle. Notice that the bug can go 5 steps in the y direction, 5 steps in the x direction, or anything in between, so the points covered by possible detours from any point would look like a rhombus or square rotated 45 degrees (with centre at a point on or inside the rectangle). Drawing this out we would get an octagon.
Finding the final answer is then easy, for this solution I will slice the octagon into 4 rectangles (2 of which are squares) and 4 isosceles triangles. There are $(4+1)\cdot (6+1) = 35$ points on or inside the original triangle, $5\cdot 7$ points covered by the rectangles above and below the original one and $5\cdot 5$ points for the squares to the right and left of the original triangle. Lastly each of the four isosceles triangles cover $4+3+2+1 = 10$ points. (Notice that although the length of the detour is 5, the points on the edge of the triangles were already counted).
Adding these up, we get $3\cdot 35 + 2\cdot 25 + 4\cdot 10 = 195 => \boxed{195}$

Answer: C 195