Navvye/Olympiad-Problems-CSV huggingface dataset:
Problem: Triangle $ABC$ is isosceles , with $AB=AC$ and altitude $AM=11.$ Suppose that there is a point $D$ on $\overline{AM}$ with $AD=10$ and $\angle BDC=3\angle BAC.$ Then the perimeter of $\triangle ABC$ may be written in the form $a+\sqrt{b},$ where $a$ and $b$ are integers.  Find $a+b.$
[asy] import graph; size(5cm); real lsf=0.5; pen dps=linewidth(0.7)+fontsize(10); defaultpen(dps); pen ds=black; real xmin=-1.55,xmax=7.95,ymin=-4.41,ymax=5.3;  draw((1,3)--(0,0)); draw((0,0)--(2,0)); draw((2,0)--(1,3)); draw((1,3)--(1,0)); draw((1,0.7)--(0,0)); draw((1,0.7)--(2,0)); label("$11$",(1,1.63),W);  dot((1,3),ds); label("$A$",(1,3),N); dot((0,0),ds); label("$B$",(0,0),SW); dot((2,0),ds); label("$C$",(2,0),SE); dot((1,0),ds); label("$M$",(1,0),S); dot((1,0.7),ds); label("$D$",(1,0.7),NE);  clip((xmin,ymin)--(xmin,ymax)--(xmax,ymax)--(xmax,ymin)--cycle);[/asy]

Solution: Suppose $\angle BAM=\angle CAM =x$ , since $\angle BDC=3\angle BAC$ , we have $\angle BDM=\angle MDC = 3x$ . Therefore, $\angle DBC=\angle DCB = 90^\circ -3x$ and $\angle ABD=\angle DCA=2x$ . As a result, $\triangle KAC$ is isosceles, $KC=KA$
Let $H$ be a point on the extension of $CD$ through $D$ such that $\overline{HB}\perp\overline{BC}$ and denote the intersection of $\overline{HC}$ and $\overline{AB}$ as $K$ . Then, $BH=2DM=2, \overline{HB}\parallel\overline{DM}$ , and $HD=DC$ by the Midpoint Theorem. So, $\angle HBA=x$ and $\angle CDM=\angle CHB=\angle HDA= 3x$
Consequently, $\triangle HBK\sim \triangle DAK$ \[\frac{BK}{KA}=\frac{HK}{KD}=\frac{1}{5}\] Assume $BK=a$ and $HK=b$ , then $KA=5a$ and $KD = 5b$ . Since $KC=KA, KC=5a$ , and since $HD=DC$ $KC=11b$ . Therefore, $a=\frac{11}{5}b$
In $\triangle BDM$ , by the Pythagorean Theorem $BM=\sqrt{36b^2-1}$ . Similarly in $\triangle BAM$ $BM=\sqrt{36a^2-121}$ . So \[\sqrt{36a^2-121}=\sqrt{36b^2-1}\] Since $a=\frac{11}{5}b$ , we have $b=\frac{5\sqrt{5}}{12}$ and $a=\frac{11\sqrt{5}}{12}$ . Consequently, $BM=\frac{11}{2}$ and $AB=\frac{11\sqrt{5}}{2}$ . Thus, the perimeter of $\triangle ABC$ is $11+\sqrt{605}$ , and the answer is $\boxed{616}$

Answer:  616
Problem: What is the largest positive integer that is not the sum of a positive integral multiple of $42$ and a positive composite integer?

Solution: Let our answer be $n$ . Write $n = 42a + b$ , where $a, b$ are positive integers and $0 \leq b < 42$ . Then note that $b, b + 42, ... , b + 42(a-1)$ are all primes.
If $b$ is $0\mod{5}$ , then $b = 5$ because $5$ is the only prime divisible by $5$ . We get $n = 215$ as our largest possibility in this case.
If $b$ is $1\mod{5}$ , then $b + 2 \times 42$ is divisible by $5$ and thus $a \leq 2$ . Thus, $n \leq 3 \times 42 = 126 < 215$
If $b$ is $2\mod{5}$ , then $b + 4 \times 42$ is divisible by $5$ and thus $a \leq 4$ . Thus, $n \leq 5 \times 42 = 210 < 215$
If $b$ is $3\mod{5}$ , then $b + 1 \times 42$ is divisible by $5$ and thus $a = 1$ . Thus, $n \leq 2 \times 42 = 84 < 215$
If $b$ is $4\mod{5}$ , then $b + 3 \times 42$ is divisible by $5$ and thus $a \leq 3$ . Thus, $n \leq 4 \times 42 = 168 < 215$
Our answer is $\boxed{215}$

Answer:  215
Problem: A right rectangular prism $P_{}$ (i.e., a rectangular parallelpiped) has sides of integral length $a, b, c,$ with $a\le b\le c.$ A plane parallel to one of the faces of $P_{}$ cuts $P_{}$ into two prisms, one of which is similar to $P_{},$ and both of which have nonzero volume.  Given that $b=1995,$ for how many ordered triples $(a, b, c)$ does such a plane exist?

Solution: Let $P'$ be the prism similar to $P$ , and let the sides of $P'$ be of length $x,y,z$ , such that $x \le y \le z$ . Then
\[\frac{x}{a} = \frac{y}{b} = \frac zc < 1.\]
Note that if the ratio of similarity was equal to $1$ , we would have a prism with zero volume. As one face of $P'$ is a face of $P$ , it follows that $P$ and $P'$ share at least two side lengths in common. Since $x < a, y < b, z < c$ , it follows that the only possibility is $y=a,z=b=1995$ . Then,
\[\frac{x}{a} = \frac{a}{1995} = \frac{1995}{c} \Longrightarrow ac = 1995^2 = 3^25^27^219^2.\]
The number of factors of $3^25^27^219^2$ is $(2+1)(2+1)(2+1)(2+1) = 81$ . Only in $\left\lfloor \frac {81}2 \right\rfloor = 40$ of these cases is $a < c$ (for $a=c$ , we end with a prism of zero volume). We can easily verify that these will yield nondegenerate prisms, so the answer is $\boxed{040}$

Answer:  040
Problem: Pyramid $OABCD$ has square base $ABCD,$ congruent edges $\overline{OA}, \overline{OB}, \overline{OC},$ and $\overline{OD},$ and $\angle AOB=45^\circ.$ Let $\theta$ be the measure of the dihedral angle formed by faces $OAB$ and $OBC.$ Given that $\cos \theta=m+\sqrt{n},$ where $m_{}$ and $n_{}$ are integers, find $m+n.$

Solution: The angle $\theta$ is the angle formed by two perpendiculars drawn to $BO$ , one on the plane determined by $OAB$ and the other by $OBC$ . Let the perpendiculars from $A$ and $C$ to $\overline{OB}$ meet $\overline{OB}$ at $P.$ Without loss of generality , let $AP = 1.$ It follows that $\triangle OPA$ is a $45-45-90$ right triangle , so $OP = AP = 1,$ $OB = OA = \sqrt {2},$ and $AB = \sqrt {4 - 2\sqrt {2}}.$ Therefore, $AC = \sqrt {8 - 4\sqrt {2}}.$
From the Law of Cosines $AC^{2} = AP^{2} + PC^{2} - 2(AP)(PC)\cos \theta,$ so
\[8 - 4\sqrt {2} = 1 + 1 - 2\cos \theta \Longrightarrow \cos \theta = - 3 + 2\sqrt {2} = - 3 + \sqrt{8}.\]
Thus $m + n = \boxed{005}$

Answer:  005
Problem: Pyramid $OABCD$ has square base $ABCD,$ congruent edges $\overline{OA}, \overline{OB}, \overline{OC},$ and $\overline{OD},$ and $\angle AOB=45^\circ.$ Let $\theta$ be the measure of the dihedral angle formed by faces $OAB$ and $OBC.$ Given that $\cos \theta=m+\sqrt{n},$ where $m_{}$ and $n_{}$ are integers, find $m+n.$

Solution: Without loss of generality, place the pyramid in a 3-dimensional coordinate system such that $A = (1,0,0),$ $B = (0,1,0),$ $C = ( - 1,0,0),$ $D = (0, - 1,0),$ and $O = (0,0,z),$ where $z$ is unknown.
We first find $z.$ Note that
\[\overrightarrow{OA}\cdot \overrightarrow{OB} = \parallel \overrightarrow{OA}\parallel \parallel \overrightarrow{OB}\parallel \cos 45^\circ.\]
Since $\overrightarrow{OA} =\, <1,0, - z>$ and $\overrightarrow{OB} =\, <0,1, - z> ,$ this simplifies to
\[z^{2}\sqrt {2} = 1 + z^{2}\implies z^{2} = 1 + \sqrt {2}.\]
Now let's find $\cos \theta.$ Let $\vec{u}$ and $\vec{v}$ be normal vectors to the planes containing faces $OAB$ and $OBC,$ respectively. From the definition of the dot product as $\vec{u}\cdot \vec{v} = \parallel \vec{u}\parallel \parallel \vec{v}\parallel \cos \theta$ , we will be able to solve for $\cos \theta.$ A cross product yields (alternatively, it is simple to find the equation of the planes $OAB$ and $OAC$ , and then to find their normal vectors)
\[\vec{u} = \overrightarrow{OA}\times \overrightarrow{OB} = \left| \begin{array}{ccc}\hat{i} & \hat{j} & \hat{k} \\ 1 & 0 & - z \\ 0 & 1 & - z \end{array}\right| =\, < z,z,1 > .\]
Similarly,
\[\vec{v} = \overrightarrow{OB}\times \overrightarrow{OC} - \left|\begin{array}{ccc}\hat{i} & \hat{j} & \hat{k} \\ 0 & 1 & - z \\ - 1 & 0 & - z \end{array}\right| =\, < - z,z,1 > .\]
Hence, taking the dot product of $\vec{u}$ and $\vec{v}$ yields
\[\cos \theta = \frac{ \vec{u} \cdot \vec{v} }{ \parallel \vec{u} \parallel \parallel \vec{v} \parallel } = \frac{- z^{2} + z^{2} + 1}{(\sqrt {1 + 2z^{2}})^{2}} =  \frac {1}{3 + 2\sqrt {2}} = 3 - 2\sqrt {2} = 3 - \sqrt {8}.\]
Flipping the signs (we found the cosine of the supplement angle) yields $\cos \theta = - 3 + \sqrt {8},$ so the answer is $\boxed{005}$

Answer:  005
Problem: Pyramid $OABCD$ has square base $ABCD,$ congruent edges $\overline{OA}, \overline{OB}, \overline{OC},$ and $\overline{OD},$ and $\angle AOB=45^\circ.$ Let $\theta$ be the measure of the dihedral angle formed by faces $OAB$ and $OBC.$ Given that $\cos \theta=m+\sqrt{n},$ where $m_{}$ and $n_{}$ are integers, find $m+n.$

Solution: Similar to Solution 1, $\angle APC$ is the dihedral angle we want. WLOG, we will let $AB=1,$ meaning $AC=\sqrt{2}$
Because $\triangle OAB,\triangle OBC$ are isosceles, $\angle ABP = 67.5^{\circ}$ $PC=PA=\cos(\angle PAB)=\cos(22.5^{\circ})$
Thus by the half-angle identity,
\[PA=\cos\left(\frac{45}{2}\right) = \sqrt{\frac{1+\cos(45^{\circ})}{2}}\] \[= \sqrt{\frac{2+\sqrt{2}}{4}}.\]
Now looking at triangle $\triangle PAC,$ we drop the perpendicular from $P$ to $AC$ , and call the foot $H$ . Then $\angle CPH = \theta / 2.$ By Pythagoreas, \[PH=\sqrt{\frac{2+\sqrt{2}}{4}-\frac{1}{2}}=\frac{\sqrt[4]{2}}{2}.\]
We have that \[\cos\left(\frac{\theta}{2}\right)=\frac{\sqrt[4]{2}}{\sqrt{2+\sqrt{2}}},\text{ so}\] \[\cos(\theta)=2\cos^{2}\left(\frac{\theta}{2}\right)-1\] \[=2\left(\frac{\sqrt{2}}{2+\sqrt{2}}\right)-1\] \[=2(\frac{2\sqrt{2}-2}{2})-1\] \[=-3+\sqrt{8}.\]
Because $m$ and $n$ can be negative integers, our answer is $(-3)+8=\boxed{005.}$

Answer:  005.
Problem: Let $f(n)$ be the integer closest to $\sqrt[4]{n}.$ Find $\sum_{k=1}^{1995}\frac 1{f(k)}.$

Solution: This is a pretty easy problem just to bash. Since the max number we can get is $7$ , we just need to test $n$ values for $1.5,2.5,3.5,4.5,5.5$ and $6.5$ . Then just do how many numbers there are times $\frac{1}{\lfloor n \rfloor}$ , which should be $5+17+37+65+101+145+30 = \boxed{400}$

Answer:  400
Problem: In a circle of radius $42$ , two chords of length $78$ intersect at a point whose distance from the center is $18$ .  The two chords divide the interior of the circle into four regions.  Two of these regions are bordered by segments of unequal lengths, and the area of either of them can be expressed uniquely in the form $m\pi-n\sqrt{d},$ where $m, n,$ and $d_{}$ are positive integers and $d_{}$ is not divisible by the square of any prime number.  Find $m+n+d.$

Solution: Let the center of the circle be $O$ , and the two chords be $\overline{AB}, \overline{CD}$ and intersecting at $E$ , such that $AE = CE < BE = DE$ . Let $F$ be the midpoint of $\overline{AB}$ . Then $\overline{OF} \perp \overline{AB}$
By the Pythagorean Theorem $OF = \sqrt{OB^2 - BF^2} = \sqrt{42^2 - 39^2} = 9\sqrt{3}$ , and $EF = \sqrt{OE^2 - OF^2} = 9$ . Then $OEF$ is a $30-60-90$ right triangle , so $\angle OEB = \angle OED = 60^{\circ}$ . Thus $\angle BEC = 60^{\circ}$ , and by the Law of Cosines
It follows that $\triangle BCO$ is an equilateral triangle , so $\angle BOC = 60^{\circ}$ . The desired area can be broken up into two regions, $\triangle BCE$ and the region bounded by $\overline{BC}$ and minor arc $\stackrel{\frown}{BC}$ . The former can be found by Heron's formula to be $[BCE] = \sqrt{60(60-48)(60-42)(60-30)} = 360\sqrt{3}$ . The latter is the difference between the area of sector $BOC$ and the equilateral $\triangle BOC$ , or $\frac{1}{6}\pi (42)^2 - \frac{42^2 \sqrt{3}}{4} = 294\pi - 441\sqrt{3}$
Thus, the desired area is $360\sqrt{3} + 294\pi - 441\sqrt{3} = 294\pi - 81\sqrt{3}$ , and $m+n+d = \boxed{378}$

Answer:  378
Problem: Let $p_{}$ be the probability that, in the process of repeatedly flipping a fair coin, one will encounter a run of $5$ heads before one encounters a run of $2$ tails.  Given that $p_{}$ can be written in the form $m/n$ where $m_{}$ and $n_{}$ are relatively prime positive integers, find $m+n$

Solution: Think of the problem as a sequence of 's and 's. No two 's can occur in a row, so the sequence is blocks of $1$ to $4$ 's separated by 's and ending in $5$ 's. Since the first letter could be or the sequence could start with a block of 's, the total probability is that $3/2$ of it has to start with an
The answer to the problem is then the sum of all numbers of the form $\frac 32 \left( \frac 1{2^a} \cdot \frac 12 \cdot \frac 1{2^b} \cdot \frac 12 \cdot \frac 1{2^c} \cdots \right) \cdot \left(\frac 12\right)^5$ , where $a,b,c \ldots$ are all numbers $1-4$ , since the blocks of 's can range from $1-4$ in length. The sum of all numbers of the form $(1/2)^a$ is $1/2+1/4+1/8+1/16=15/16$ , so if there are n blocks of 's before the final five 's, the answer can be rewritten as the sum of all numbers of the form $\frac 32\left( \left(\frac {15}{16}\right)^n \cdot \left(\frac 12\right)^n \right) \cdot \left(\frac 1{32}\right)=\frac 3{64}\left(\frac{15}{32}\right)^n$ , where $n$ ranges from $0$ to $\infty$ , since that's how many blocks of 's there can be before the final five. This is an infinite geometric series whose sum is $\frac{3/64}{1-(15/32)}=\frac{3}{34}$ , so the answer is $\boxed{037}$

Answer:  037
Problem: Let $p_{}$ be the probability that, in the process of repeatedly flipping a fair coin, one will encounter a run of $5$ heads before one encounters a run of $2$ tails.  Given that $p_{}$ can be written in the form $m/n$ where $m_{}$ and $n_{}$ are relatively prime positive integers, find $m+n$

Solution: Let $p_H, p_T$ respectively denote the probabilities that a string beginning with 's and 's are successful. Thus,
A successful string can either start with 1 to 4 H's, start with a T and then continue with a string starting with (as there cannot be $2$ 's in a row, or be the string HHHHH.
There is a $\frac{1}{16}$ probability we roll $4$ consecutive 's, and there is a $\frac{15}{16}$ probability we roll a . Thus,
The answer is $p_H + p_T = \frac{3}{2}p_H = \frac{3}{34}$ , and $m+n = \boxed{037}$

Answer:  037
Problem: Let $p_{}$ be the probability that, in the process of repeatedly flipping a fair coin, one will encounter a run of $5$ heads before one encounters a run of $2$ tails.  Given that $p_{}$ can be written in the form $m/n$ where $m_{}$ and $n_{}$ are relatively prime positive integers, find $m+n$

Solution: For simplicity, let's compute the complement, namely the probability of getting to $2$ tails before $5$ heads.
Let $h_{i}$ denote the probability that we get $2$ tails before $5$ heads, given that we have $i$ consecutive heads. Similarly, let $t_{i}$ denote the probability that we get $2$ tails before $5$ heads, given that we have $i$ consecutive tails. Specifically, $h_{5} = 0$ and $t_{2} = 1$ . If we can solve for $h_{1}$ and $t_{1}$ , we are done; the answer is simply $1/2 * (h_{1} + t_{1})$ , since on our first roll, we have equal chances of getting a string with "1 consecutive head" or "1 consecutive tail."
Consider solving for $t_{1}$ . If we have 1 consecutive tail, then (a) rolling a head gets us to 1 consecutive head and (b) rolling a tail gets us to 2 consecutive tails. So, we must have:
Applying similar logic, we get the equations:
\begin{align*} h_{1} &= \frac{1}{2} h_{2} + \frac{1}{2} t_{1}\\ h_{2} &= \frac{1}{2} h_{3} + \frac{1}{2} t_{1}\\ h_{3} &= \frac{1}{2} h_{4} + \frac{1}{2} t_{1}\\ h_{4} &= \frac{1}{2} h_{5} + \frac{1}{2} t_{1} \end{align*}
Since $h_{5} = 0$ , we get $h_{4} = \frac{1}{2} t_{1}$ $\Rightarrow h_{3} = \frac{3}{4} t_{1}$ $\Rightarrow h_{2} = \frac{7}{8} t_{1}$ $\Rightarrow h_{1} = \frac{15}{16} t_{1}$ $\Rightarrow t_{1} = \frac{1}{2} t_{2} + \frac{1}{2} \cdot \frac{15}{16} t_{1} = \frac{1}{2} + \frac{15}{32} t_{1} \Rightarrow t_{1} = \frac{16}{17}$ $\Rightarrow h_{1} = \frac{15}{16} \cdot \frac{16}{17} = \frac{15}{17}$
So, the probability of reaching $2$ tails before $5$ heads is $\frac{1}{2} (h_{1} + t_{1}) = \frac{31}{34}$ ; we want the complement, $\frac{3}{34}$ , yielding an answer of $3 + 34 = \boxed{037}$

Answer:  037
Problem: Let $p_{}$ be the probability that, in the process of repeatedly flipping a fair coin, one will encounter a run of $5$ heads before one encounters a run of $2$ tails.  Given that $p_{}$ can be written in the form $m/n$ where $m_{}$ and $n_{}$ are relatively prime positive integers, find $m+n$

Solution: Consider what happens in the "endgame" or what ultimately leads to the end. Let A denote that a head has been flipped, and let B denote that a tail has been flipped. The endgame outcomes are AAAAA, BAAAAA, BB, ABB, AABB, AAABB, AAAABB. The probabilities of each of these are $\frac{1}{32},\frac{1}{64},\frac{1}{4},\frac{1}{8},\frac{1}{16},\frac{1}{32},\frac{1}{64}$ respectively. The ones where there is five heads are AAAAA and BAAAAA. The sum of these probabilities are $\frac{3}{64}$ . The sum of all these endgame outcomes are $\frac{34}{64}$ , hence the desired probability is $\frac{3}{34}$ , and in this case $m=3,n=34$ so we have $m+n=\boxed{037}$ -vsamc

Answer:  037
Problem: The increasing sequence $3, 15, 24, 48, \ldots\,$ consists of those positive multiples of 3 that are one less than a perfect square .  What is the remainder when the 1994th term of the sequence is divided by 1000?

Solution: One less than a perfect square can be represented by $n^2 - 1 = (n+1)(n-1)$ . Either $n+1$ or $n-1$ must be divisible by 3. This is true when $n \equiv -1,\ 1 \equiv 2,\ 1 \pmod{3}$ . Since 1994 is even, $n$ must be congruent to $1 \pmod{3}$ . It will be the $\frac{1994}{2} = 997$ th such term, so $n = 4 + (997-1) \cdot 3 = 2992$ . The value of $n^2 - 1 = 2992^2 - 1 \pmod{1000}$ is $\boxed{063}$

Answer:  063
Problem: A circle with diameter $\overline{PQ}$ of length 10 is internally tangent at $P$ to a circle of radius 20. Square $ABCD$ is constructed with $A$ and $B$ on the larger circle, $\overline{CD}$ tangent at $Q$ to the smaller circle, and the smaller circle outside $ABCD$ . The length of $\overline{AB}$ can be written in the form $m + \sqrt{n}$ , where $m$ and $n$ are integers. Find $m + n$
1994 AIME Problem 2.png
Note: The diagram was not given during the actual contest.

Solution: 1994 AIME Problem 2 - Solution.png
Call the center of the larger circle $O$ . Extend the diameter $\overline{PQ}$ to the other side of the square (at point $E$ ), and draw $\overline{AO}$ . We now have a right triangle , with hypotenuse of length $20$ . Since $OQ = OP - PQ = 20 - 10 = 10$ , we know that $OE = AB - OQ = AB - 10$ . The other leg, $AE$ , is just $\frac 12 AB$
Apply the Pythagorean Theorem
The quadratic formula shows that the answer is $\frac{16 \pm \sqrt{16^2 + 4 \cdot 240}}{2} = 8 \pm \sqrt{304}$ . Discard the negative root, so our answer is $8 + 304 = \boxed{312}$

Answer:  312
Problem: The function $f_{}^{}$ has the property that, for each real number $x,\,$
If $f(19)=94,\,$ what is the remainder when $f(94)\,$ is divided by $1000$

Solution: \begin{align*}f(94)&=94^2-f(93)=94^2-93^2+f(92)=94^2-93^2+92^2-f(91)=\cdots \\ &= (94^2-93^2) + (92^2-91^2) +\cdots+ (22^2-21^2)+ 20^2-f(19) \\ &= 94+93+\cdots+21+400-94  \\ &= 4561 \end{align*}
So, the remainder is $\boxed{561}$

Answer:  561
Problem: The function $f_{}^{}$ has the property that, for each real number $x,\,$
If $f(19)=94,\,$ what is the remainder when $f(94)\,$ is divided by $1000$

Solution: Those familiar with triangular numbers and some of their properties will quickly recognize the equation given in the problem. It is well-known (and easy to show) that the sum of two consecutive triangular numbers is a perfect square; that is, \[T_{n-1} + T_n = n^2,\] where $T_n = 1+2+...+n = \frac{n(n+1)}{2}$ is the $n$ th triangular number.
Using this, as well as using the fact that the value of $f(x)$ directly determines the value of $f(x+1)$ and $f(x-1),$ we conclude that $f(n) = T_n + K$ for all odd $n$ and $f(n) = T_n - K$ for all even $n,$ where $K$ is a constant real number.
Since $f(19) = 94$ and $T_{19} = 190,$ we see that $K = -96.$ It follows that $f(94) = T_{94} - (-96) = \frac{94\cdot 95}{2} + 96 = 4561,$ so the answer is $\boxed{561}$

Answer:  561
Problem: Find the positive integer $n\,$ for which \[\lfloor\log_2{1}\rfloor+\lfloor\log_2{2}\rfloor+\lfloor\log_2{3}\rfloor+\cdots+\lfloor\log_2{n}\rfloor=1994\] (For real $x\,$ $\lfloor x\rfloor\,$ is the greatest integer $\le x.\,$

Solution: Note that if $2^x \le a<2^{x+1}$ for some $x\in\mathbb{Z}$ , then $\lfloor\log_2{a}\rfloor=\log_2{2^{x}}=x$
Thus, there are $2^{x+1}-2^{x}=2^{x}$ integers $a$ such that $\lfloor\log_2{a}\rfloor=x$ . So the sum of $\lfloor\log_2{a}\rfloor$ for all such $a$ is $x\cdot2^x$
Let $k$ be the integer such that $2^k \le n<2^{k+1}$ . So for each integer $j<k$ , there are $2^j$ integers $a\le n$ such that $\lfloor\log_2{a}\rfloor=j$ , and there are $n-2^k+1$ such integers such that $\lfloor\log_2{a}\rfloor=k$
Therefore, $\lfloor\log_2{1}\rfloor+\lfloor\log_2{2}\rfloor+\lfloor\log_2{3}\rfloor+\cdots+\lfloor\log_2{n}\rfloor= \sum_{j=0}^{k-1}(j\cdot2^j) + k(n-2^k+1) = 1994$
Through computation: $\sum_{j=0}^{7}(j\cdot2^j)=1538<1994$ and $\sum_{j=0}^{8}(j\cdot2^j)=3586>1994$ . Thus, $k=8$
So, $\sum_{j=0}^{k-1}(j\cdot2^j) + k(n-2^k+1) = 1538+8(n-2^8+1)=1994 \Rightarrow n = \boxed{312}$

Answer:  312
Problem: Given a positive integer $n\,$ , let $p(n)\,$ be the product of the non-zero digits of $n\,$ .  (If $n\,$ has only one digits, then $p(n)\,$ is equal to that digit.)  Let
What is the largest prime factor of $S\,$

Solution: Suppose we write each number in the form of a three-digit number (so $5 \equiv 005$ ), and since our $p(n)$ ignores all of the zero-digits, replace all of the $0$ s with $1$ s. Now note that in the expansion of
we cover every permutation of every product of $3$ digits, including the case where that first $1$ represents the replaced $0$ s. However, since our list does not include $000$ , we have to subtract $1$ . Thus, our answer is the largest prime factor of $(1+1+2+3+\cdots +9)^3 - 1 = 46^3 - 1 = (46-1)(46^2 + 46 + 1) = 3^3 \cdot 5 \cdot 7 \cdot \boxed{103}$

Answer:  103
Problem: Given a positive integer $n\,$ , let $p(n)\,$ be the product of the non-zero digits of $n\,$ .  (If $n\,$ has only one digits, then $p(n)\,$ is equal to that digit.)  Let
What is the largest prime factor of $S\,$

Solution: Note that $p(1)=p(11), p(2)=p(12), p(3)=p(13), \cdots p(19)=p(9)$ , and $p(37)=3p(7)$ . So $p(10)+p(11)+p(12)+\cdots +p(19)=46$ $p(10)+p(11)+\cdots +p(99)=46*45=2070$ . We add $p(1)+p(2)+p(3)+\cdots +p(10)=45$ to get 2115. When we add a digit we multiply the sum by that digit. Thus $2115\cdot (1+1+2+3+4+5+6+7+8+9)=2115\cdot 46=47\cdot 45\cdot 46$ . But we didn't count 100, 200, 300, ..., 900. We add another 45 to get $45\cdot 2163$ . The largest prime factor of that is $\boxed{103}$

Answer:  103
Problem: The graphs of the equations
are drawn in the coordinate plane for $k=-10,-9,-8,\ldots,9,10.\,$ These 63 lines cut part of the plane into equilateral triangles of side length $\tfrac{2}{\sqrt{3}}.\,$ How many such triangles are formed?

Solution: We note that the lines partition the hexagon of the six extremal lines into disjoint unit regular triangles, and forms a series of unit regular triangles along the edge of the hexagon.
[asy] size(200); picture pica, picb, picc; int i; for(i=-10;i<=10;++i){ if((i%10) == 0){draw(pica,(-20/sqrt(3)-abs((0,i))/sqrt(3),i)--(20/sqrt(3)+abs((0,i))/sqrt(3),i),black+0.7);} else{draw(pica,(-20/sqrt(3)-abs((0,i))/sqrt(3),i)--(20/sqrt(3)+abs((0,i))/sqrt(3),i));} } picb = rotate(120,origin)*pica; picc = rotate(240,origin)*pica; add(pica);add(picb);add(picc); [/asy]
Solving the above equations for $k=\pm 10$ , we see that the hexagon in question is regular, with side length $\frac{20}{\sqrt{3}}$ . Then, the number of triangles within the hexagon is simply the ratio of the area of the hexagon to the area of a regular triangle. Since the ratio of the area of two similar figures is the square of the ratio of their side lengths, we see that the ratio of the area of one of the six equilateral triangles composing the regular hexagon to the area of a unit regular triangle is just $\left(\frac{20/\sqrt{3}}{2/\sqrt{3}}\right)^2 = 100$ . Thus, the total number of unit triangles is $6 \times 100 = 600$
There are $6 \cdot 10$ equilateral triangles formed by lines on the edges of the hexagon. Thus, our answer is $600+60 = \boxed{660}$

Answer:  660