Navvye/Olympiad-Problems-CSV huggingface dataset:
Problem: What is the greatest integer less than or equal to \[\frac{3^{100}+2^{100}}{3^{96}+2^{96}}?\]
$\textbf{(A) }80\qquad \textbf{(B) }81 \qquad \textbf{(C) }96 \qquad \textbf{(D) }97 \qquad \textbf{(E) }625\qquad$

Solution: Dividing by $2^{96}$ in both numerator and denominator, this fraction can be rewritten as \[\frac{81 \times (1.5)^{96} + 16}{(1.5)^{96} + 1}.\] Notice that the $+1$ and the $+16$ will be so insignificant compared to a number such as $(1.5)^{96},$ and that thereby the fraction will be ever so slightly less than $81$ . Thereby, we see that the answer is $\boxed{80}.$

Answer: A 80
Problem: What is the greatest integer less than or equal to \[\frac{3^{100}+2^{100}}{3^{96}+2^{96}}?\]
$\textbf{(A) }80\qquad \textbf{(B) }81 \qquad \textbf{(C) }96 \qquad \textbf{(D) }97 \qquad \textbf{(E) }625\qquad$

Solution: If you multiply $(3^{96} + 2^{96})$ by $(3^{4} + 2^{4})$ (to get the exponent up to 100), you'll get $(3^{100} + 2^{100}) + 3^{96} \cdot 2^{4} + 2^{96} \cdot 3^{4}$ . Thus, in the numerator, if you add and subtract by $3^{96} \cdot 2^{4}$ and $2^{96} \cdot 3^{4}$ , you'll get $\frac{(3^{4} + 2^{4})(3^{100} + 2^{100}) - 3^{96} \cdot 2^{4} - 2^{96} \cdot 3^{4}}{3^{96}+2^{96}}$ . You can then take out out the first number to get $3^{4} + 2^{4} - \frac{3^{96} \cdot 2^{4} + 2^{96} \cdot 3^{4}}{3^{96}+2^{96}}$ . This can then be written as $87 - \frac{16 \cdot 3^{96} + 16 \cdot 2^{96} + 75 \cdot 2^{96}}{3^{96}+2^{96}}$ , factoring out the 16 and splitting the fraction will give you $87 - 16 - \frac{65 \cdot 2^{96}}{3^{96}+2^{96}}$ , giving you $81 - \frac{65 \cdot 2^{96}}{3^{96}+2^{96}}$ . While you can roughly say that $\frac{65 \cdot 2^{96}}{3^{96}+2^{96}} < 1$ you can also notice that the only answer choice less than 81 is 80, thus the answer is $\boxed{80}.$

Answer: A 80
Problem: What is the greatest integer less than or equal to \[\frac{3^{100}+2^{100}}{3^{96}+2^{96}}?\]
$\textbf{(A) }80\qquad \textbf{(B) }81 \qquad \textbf{(C) }96 \qquad \textbf{(D) }97 \qquad \textbf{(E) }625\qquad$

Solution: If you factor out $3^{100}$ from the numerator and $3^{96}$ from the denominator, you will get $\frac{3^{100}\left(1+(\frac{2}{3}\right)^{100})}{3^{96}\left(1+(\frac{2}{3}\right)^{96})}$ . Divide the numerator and denominator by $3^{96}$ to get $\frac{81\left(1+(\frac{2}{3}\right)^{100})}{\left(1+(\frac{2}{3}\right)^{96})}$ . We see that every time we multiply $\frac{2}{3}$ by itself, it slightly decreases, so $1+(\frac{2}{3})^{100}$ will be ever so slightly smaller than $1+(\frac{2}{3})^{96}$ . Thus, the decimal representation of $\frac{\left(1+(\frac{2}{3}\right)^{100})}{\left(1+(\frac{2}{3}\right)^{96})}$ will be extremely close to $1$ , so our solution will be the largest integer that is less than $81$ . Thus, the answer is $\boxed{80}.$

Answer: A 80
Problem: Two circles of radius $5$ are externally tangent to each other and are internally tangent to a circle of radius $13$ at points $A$ and $B$ , as shown in the diagram. The distance $AB$ can be written in the form $\tfrac{m}{n}$ , where $m$ and $n$ are relatively prime positive integers. What is $m+n$
[asy] draw(circle((0,0),13)); draw(circle((5,-6.2),5)); draw(circle((-5,-6.2),5)); label("$B$", (9.5,-9.5), S); label("$A$", (-9.5,-9.5), S); [/asy]
$\textbf{(A) }   21   \qquad    \textbf{(B) }  29   \qquad    \textbf{(C) }  58   \qquad   \textbf{(D) } 69 \qquad  \textbf{(E) }   93$

Solution: [asy] draw(circle((0,0),13)); draw(circle((5,-6.25),5)); draw(circle((-5,-6.25),5)); label("$A$", (-8.125,-10.15), S); label("$B$", (8.125,-10.15), S); draw((0,0)--(-8.125,-10.15)); draw((0,0)--(8.125,-10.15)); draw((-5,-6.25)--(5,-6.25)); draw((-8.125,-10.15)--(8.125,-10.15)); label("$X$", (0,0), N); label("$Y$", (-5,-6.25),NW); label("$Z$", (5,-6.25),NE); [/asy]
Let the center of the surrounding circle be $X$ . The circle that is tangent at point $A$ will have point $Y$ as the center. Similarly, the circle that is tangent at point $B$ will have point $Z$ as the center. Connect $AB$ $YZ$ $XA$ , and $XB$ . Now observe that $\triangle XYZ$ is similar to $\triangle XAB$ by SAS.
Writing out the ratios, we get \[\frac{XY}{XA}=\frac{YZ}{AB} \Rightarrow \frac{13-5}{13}=\frac{5+5}{AB} \Rightarrow \frac{8}{13}=\frac{10}{AB} \Rightarrow AB=\frac{65}{4}.\] Therefore, our answer is $65+4= \boxed{69}$

Answer: D 69
Problem: Right triangle $ABC$ has leg lengths $AB=20$ and $BC=21$ . Including $\overline{AB}$ and $\overline{BC}$ , how many line segments with integer length can be drawn from vertex $B$ to a point on hypotenuse $\overline{AC}$
$\textbf{(A) }5 \qquad \textbf{(B) }8 \qquad \textbf{(C) }12 \qquad \textbf{(D) }13 \qquad \textbf{(E) }15 \qquad$

Solution: [asy] unitsize(4); pair A, B, C, E, P; A=(-20, 0); B=origin; C=(0,21); E=(-21, 20); P=extension(B,E, A, C); draw(A--B--C--cycle); draw(B--P); dot("$A$", A, SW); dot("$B$", B, SE); dot("$C$", C, NE); dot("$P$", P, NW); [/asy]
As the problem has no diagram, we draw a diagram. The hypotenuse has length $29$ . Let $P$ be the foot of the altitude from $B$ to $AC$ . Note that $BP$ is the shortest possible length of any segment. Writing the area of the triangle in two ways, we can solve for $BP=\dfrac{20\cdot  21}{29}$ , which is between $14$ and $15$
Let the line segment be $BX$ , with $X$ on $AC$ . As you move $X$ along the hypotenuse from $A$ to $P$ , the length of $BX$ strictly decreases, hitting all the integer values from $20, 19, \dots 15$ (IVT). Similarly, moving $X$ from $P$ to $C$ hits all the integer values from $15, 16, \dots, 21$ . This is a total of $\boxed{13}$ distinct line segments.
(asymptote diagram added by elements2015)

Answer: D 13
Problem: Let $S$ be a set of $6$ integers taken from $\{1,2,\dots,12\}$ with the property that if $a$ and $b$ are elements of $S$ with $a<b$ , then $b$ is not a multiple of $a$ . What is the least possible value of an element in $S$
$\textbf{(A)}\ 2\qquad\textbf{(B)}\ 3\qquad\textbf{(C)}\ 4\qquad\textbf{(D)}\ 5\qquad\textbf{(E)}\ 7$

Solution: We start with $2$ because $1$ is not an answer choice. We would have to include every odd number except $1$ to fill out the set, but then $3$ and $9$ would violate the rule, so that won't work.
Experimentation with $3$ shows it's likewise impossible. You can include $7,11,$ and either $5$ or $10$ (which are always safe). But after adding either $4$ or $8$ we have no more valid numbers.
Finally, starting with $4,$ we find that the sequence $4,5,6,7,9,11$ works, giving us $\boxed{4}.$

Answer: C 4
Problem: Let $S$ be a set of $6$ integers taken from $\{1,2,\dots,12\}$ with the property that if $a$ and $b$ are elements of $S$ with $a<b$ , then $b$ is not a multiple of $a$ . What is the least possible value of an element in $S$
$\textbf{(A)}\ 2\qquad\textbf{(B)}\ 3\qquad\textbf{(C)}\ 4\qquad\textbf{(D)}\ 5\qquad\textbf{(E)}\ 7$

Solution: We know that all odd numbers except $1,$ namely $3, 5, 7, 9, 11,$ can be used.
Now we have $7$ possibilities to choose from for the last number (out of $1, 2, 4, 6, 8, 10, 12$ ). We can eliminate $1, 2, 10,$ and $12,$ and we have $4, 6, 8$ to choose from. However, $9$ is a multiple of $3.$ Now we have to take out either $3$ or $9$ from the list. If we take out $9,$ none of the numbers would work, but if we take out $3,$ we get \[4, 5, 6, 7, 9, 11.\] The least number is $4,$ so the answer is $\boxed{4}.$

Answer: C 4
Problem: Let $S$ be a set of $6$ integers taken from $\{1,2,\dots,12\}$ with the property that if $a$ and $b$ are elements of $S$ with $a<b$ , then $b$ is not a multiple of $a$ . What is the least possible value of an element in $S$
$\textbf{(A)}\ 2\qquad\textbf{(B)}\ 3\qquad\textbf{(C)}\ 4\qquad\textbf{(D)}\ 5\qquad\textbf{(E)}\ 7$

Solution: We can get the multiples for the numbers in the original set with multiples in the same original set \begin{align*} 1&: \ \text{all elements of }\{1,2,\dots,12\} \\ 2&: \ 4,6,8,10,12 \\ 3&: \ 6,9,12 \\ 4&: \ 8,12 \\ 5&: \ 10 \\ 6&: \ 12 \end{align*} It will be safe to start with $5$ or $6$ since they have the smallest number of multiples as listed above, but since the question asks for the least, it will be better to try others.
Trying $4,$ we can get $4,5,6,7,9,11.$ So $4$ works.
Trying $3,$ it won't work, so the least is $4.$ This means the answer is $\boxed{4}.$

Answer: C 4
Problem: Let $S$ be a set of $6$ integers taken from $\{1,2,\dots,12\}$ with the property that if $a$ and $b$ are elements of $S$ with $a<b$ , then $b$ is not a multiple of $a$ . What is the least possible value of an element in $S$
$\textbf{(A)}\ 2\qquad\textbf{(B)}\ 3\qquad\textbf{(C)}\ 4\qquad\textbf{(D)}\ 5\qquad\textbf{(E)}\ 7$

Solution: We partition $\{1,2,\ldots,12\}$ into six nonempty subsets such that for every subset, each element is a multiple of all elements less than or equal to itself: \[\{1,2,4,8\}, \ \{3,6,12\}, \ \{5,10\}, \ \{7\}, \ \{9\}, \ \{11\}.\] Clearly, $S$ must contain exactly one element from each subset:
If $4\in S,$ then the possibilities of $S$ are $\{4,5,6,7,9,11\}$ or $\{4,6,7,9,10,11\}.$ So, the least possible value of an element in $S$ is $\boxed{4}.$

Answer: C 4
Problem: Let $S$ be a set of $6$ integers taken from $\{1,2,\dots,12\}$ with the property that if $a$ and $b$ are elements of $S$ with $a<b$ , then $b$ is not a multiple of $a$ . What is the least possible value of an element in $S$
$\textbf{(A)}\ 2\qquad\textbf{(B)}\ 3\qquad\textbf{(C)}\ 4\qquad\textbf{(D)}\ 5\qquad\textbf{(E)}\ 7$

Solution: We start with 2 as 1 is not an answer option. Our set would be $\{2,3,5,7,11\}$ . We realize we cannot add 12 to the set because 12 is a multiple of 3. Our set only has 5 elements, so starting with 2 won't work.
We try 3 next. Our set becomes $\{3,4,5,7,11\}$ . We run into the same issue as before so starting with 3 won't work.
We then try 4. Our set becomes $\{4,5,6,7,9,11\}$ . We see we have 6 elements with none being multiples of each other. Therefore our answer is $\boxed{4}.$

Answer: C 4
Problem: How many nonnegative integers can be written in the form \[a_7\cdot3^7+a_6\cdot3^6+a_5\cdot3^5+a_4\cdot3^4+a_3\cdot3^3+a_2\cdot3^2+a_1\cdot3^1+a_0\cdot3^0,\] where $a_i\in \{-1,0,1\}$ for $0\le i \le 7$
$\textbf{(A) } 512 \qquad  \textbf{(B) } 729 \qquad  \textbf{(C) } 1094 \qquad  \textbf{(D) } 3281 \qquad  \textbf{(E) } 59,048$

Solution: This looks like balanced ternary, in which all the integers with absolute values less than $\frac{3^n}{2}$ are represented in $n$ digits. There are 8 digits. Plugging in 8 into the formula for the balanced ternary gives a maximum bound of $|x|=3280.5$ , which means there are 3280 positive integers, 0, and 3280 negative integers. Since we want all nonnegative integers, there are $3280+1=\boxed{3281}$

Answer: D 3281
Problem: How many nonnegative integers can be written in the form \[a_7\cdot3^7+a_6\cdot3^6+a_5\cdot3^5+a_4\cdot3^4+a_3\cdot3^3+a_2\cdot3^2+a_1\cdot3^1+a_0\cdot3^0,\] where $a_i\in \{-1,0,1\}$ for $0\le i \le 7$
$\textbf{(A) } 512 \qquad  \textbf{(B) } 729 \qquad  \textbf{(C) } 1094 \qquad  \textbf{(D) } 3281 \qquad  \textbf{(E) } 59,048$

Solution: Note that all numbers formed from this sum are either positive, negative or zero. The number of positive numbers formed by this sum is equal to the number of negative numbers formed by this sum, because of symmetry. There is only one way to achieve a sum of zero, if all $a_i=0$ . The total number of ways to pick $a_i$ from $i=0, 1, 2, 3, ... 7$ is $3^8=6561$ $\frac{6561-1}{2}=3280$ gives the number of possible negative integers. The question asks for the number of non-negative integers, so subtracting from the total gives $6561-3280=\boxed{3281}$ . (RegularHexagon, KLBBC minor changes)

Answer: D 3281
Problem: How many nonnegative integers can be written in the form \[a_7\cdot3^7+a_6\cdot3^6+a_5\cdot3^5+a_4\cdot3^4+a_3\cdot3^3+a_2\cdot3^2+a_1\cdot3^1+a_0\cdot3^0,\] where $a_i\in \{-1,0,1\}$ for $0\le i \le 7$
$\textbf{(A) } 512 \qquad  \textbf{(B) } 729 \qquad  \textbf{(C) } 1094 \qquad  \textbf{(D) } 3281 \qquad  \textbf{(E) } 59,048$

Solution: Note that the number of total possibilities (ignoring the conditions set by the problem) is $3^8=6561$ . So, E is clearly unrealistic.
Note that if $a_7$ is 1, then it's impossible for \[a_7\cdot3^7+a_6\cdot3^6+a_5\cdot3^5+a_4\cdot3^4+a_3\cdot3^3+a_2\cdot3^2+a_1\cdot3^1+a_0\cdot3^0,\] to be negative. Therefore, if $a_7$ is 1, there are $3^7=2187$ possibilities. (We also must convince ourselves that these $2187$ different sets of coefficients must necessarily yield $2187$ different integer results.)
As A, B, and C are all less than 2187, the answer must be $\boxed{3281}$

Answer: D 3281
Problem: How many nonnegative integers can be written in the form \[a_7\cdot3^7+a_6\cdot3^6+a_5\cdot3^5+a_4\cdot3^4+a_3\cdot3^3+a_2\cdot3^2+a_1\cdot3^1+a_0\cdot3^0,\] where $a_i\in \{-1,0,1\}$ for $0\le i \le 7$
$\textbf{(A) } 512 \qquad  \textbf{(B) } 729 \qquad  \textbf{(C) } 1094 \qquad  \textbf{(D) } 3281 \qquad  \textbf{(E) } 59,048$

Solution: Note that we can do some simple casework:
If $a_7=1$ , then we can choose anything for the other 7 variables, so this give us $3^7$ .
If $a_7=0$ and $a_6=1$ , then we can choose anything for the other 6 variables, giving us $3^6$ .
If $a_7=0$ $a_6=0$ , and $a_5=1$ , then we have $3^5$ .
Continuing in this vein, we have $3^7+3^6+\cdots+3^1+3^0$ ways to choose the variables' values, except we have to add 1
because we haven't counted the case where all variables are 0. So our total sum is $\boxed{3281}$ .
Note that we have counted all possibilities, because the largest positive positive power of 3 must be greater than or equal to the largest negative positive power of 3, for the number to be nonnegative.

Answer: D 3281
Problem: How many nonnegative integers can be written in the form \[a_7\cdot3^7+a_6\cdot3^6+a_5\cdot3^5+a_4\cdot3^4+a_3\cdot3^3+a_2\cdot3^2+a_1\cdot3^1+a_0\cdot3^0,\] where $a_i\in \{-1,0,1\}$ for $0\le i \le 7$
$\textbf{(A) } 512 \qquad  \textbf{(B) } 729 \qquad  \textbf{(C) } 1094 \qquad  \textbf{(D) } 3281 \qquad  \textbf{(E) } 59,048$

Solution: This solution has a similar idea to that of above.
We will start off with casework on $a_{7}$ :
If $a_7 = -1$ , we can show that there is no way to assign the values of $-1, 0, 1$ to the other $a_{i}$ 's for $0 \leq i \leq 6$ . This is because even if we make all of the other $a_{i}$ equal to $1$ , we will have that our number is $(-1)(3^{7}) + (3^{6}+3^{5}+...+3^{0}) = -3^{7} + \frac{3^{7}-1}{3-1}$ . However, note that since $\frac{3^{7}-1}{3-1} < 3^{7}$ $-3^{7} + \frac{3^{7}-1}{3-1} < 0$ .
If $a_{7}=0$ , we can ignore $a_{7}$ and pretend like it never even existed. This then simplifies the problem: the question remains the same, except that instead of having $a_{0}...a_{7}$ , we only have $a_{0}...a_{6}$ . Now, we introduce some notation: let the number of nonnegative integers that can be written in the form of $a_{n} \cdot 3^{n} + ... + a_{0} \cdot 3^{0}$ be denoted as $S_{n}$ . Then, the problem is asking us for $S_{7}$ , and the total number of nonnegative integers we get from this case is $S_{6}$ . Let's keep this in mind and revisit this idea later.
If $a_{7}=1$ , we can show that no matter what values we assign to the rest of the $a_{i}$ , we will always get a nonnegative integer (we can make this even stricter and say positive integer). This is because of something we figured out in the first case: $\frac{3^{7}-1}{3-1} < 3^{7}$ . So, even if we let $a_{i}=-1$ for $0 \leq i \leq 6$ , we will still have $3^{7} - (3^{6}+...+3^{0}) > 0$ . So, for this case, we have $3^7$ possible nonnegative integers.
Totalling up our values from the three cases, we see that $S_{7} = 0 + S_{6} + 3^{7}$ . In fact, using the reasoning from the three cases above, we can deduce that, for all positive integers $n$ $S_{n} = 3^{n} + S_{n-1}$ . We can now start building up our values for $S$ $S_{0} = 2$ $a_{0} = 0, 1$ ), $S_{1} = 3^{1}+S_{0} = 5, S_{2} = 14, ..., S_{6}=1094$ . So, we have $S_{7} = 2187 + 1094 = \boxed{3281}$ .
~advanture

Answer: D 3281
Problem: How many nonnegative integers can be written in the form \[a_7\cdot3^7+a_6\cdot3^6+a_5\cdot3^5+a_4\cdot3^4+a_3\cdot3^3+a_2\cdot3^2+a_1\cdot3^1+a_0\cdot3^0,\] where $a_i\in \{-1,0,1\}$ for $0\le i \le 7$
$\textbf{(A) } 512 \qquad  \textbf{(B) } 729 \qquad  \textbf{(C) } 1094 \qquad  \textbf{(D) } 3281 \qquad  \textbf{(E) } 59,048$

Solution: The key is to realize that this question is basically taking place in $a\in\{0,1,2\}$ if each value of $a$ was increased by $1$ , essentially making it into base $3$ . Then the range would be from $0\cdot3^7+$ $0\cdot3^6+$ $0\cdot3^5+$ $0\cdot3^4+$ $0\cdot3^3+$ $0\cdot3^2+$ $0\cdot3^1+$ $0\cdot3^0=$ $0$ to $2\cdot3^7+$ $2\cdot3^6+$ $2\cdot3^5+$ $2\cdot3^4+$ $2\cdot3^3+$ $2\cdot3^2+$ $2\cdot3^1+$ $2\cdot3^0=$ $3^8-1=$ $6561-1=$ $6560$ , yielding $6561$ different values. Since the distribution for all $a_i\in \{-1,0,1\}$ the question originally gave is symmetrical, we retain the $3280$ positive integers and one $0$ but discard the $3280$ negative integers. Thus, we are left with the answer, $\boxed{3281}\qquad$ .  --anna0kear

Answer: D 3281
Problem: How many nonnegative integers can be written in the form \[a_7\cdot3^7+a_6\cdot3^6+a_5\cdot3^5+a_4\cdot3^4+a_3\cdot3^3+a_2\cdot3^2+a_1\cdot3^1+a_0\cdot3^0,\] where $a_i\in \{-1,0,1\}$ for $0\le i \le 7$
$\textbf{(A) } 512 \qquad  \textbf{(B) } 729 \qquad  \textbf{(C) } 1094 \qquad  \textbf{(D) } 3281 \qquad  \textbf{(E) } 59,048$

Solution: First, set $a_i=0$ for all $i\geq1$ . The range would be the integers for which $[-1,1]$ . If $a_i=0$ for all $i\geq2$ , our set expands to include all integers such that $-4\leq\mathbb{Z}\leq4$ . Similarly, when $i\geq3$ we get $-13\leq\mathbb{Z}\leq13$ , and when $i\geq4$ the range is $-40\leq\mathbb{Z}\leq40$ . The pattern continues until we reach $i=7$ , where $-3280\leq\mathbb{Z}\leq3280$ . Because we are only looking for positive integers, we filter out all $\mathbb{Z}<0$ , leaving us with all integers between $0\leq\mathbb{Z}\leq3280$ , inclusive. The answer becomes $\boxed{3281}$ .  --anna0kear

Answer: D 3281
Problem: How many nonnegative integers can be written in the form \[a_7\cdot3^7+a_6\cdot3^6+a_5\cdot3^5+a_4\cdot3^4+a_3\cdot3^3+a_2\cdot3^2+a_1\cdot3^1+a_0\cdot3^0,\] where $a_i\in \{-1,0,1\}$ for $0\le i \le 7$
$\textbf{(A) } 512 \qquad  \textbf{(B) } 729 \qquad  \textbf{(C) } 1094 \qquad  \textbf{(D) } 3281 \qquad  \textbf{(E) } 59,048$

Solution: To get the number of integers, we can get the highest positive integer that can be represented using \[a_7\cdot3^7+a_6\cdot3^6+a_5\cdot3^5+a_4\cdot3^4+a_3\cdot3^3+a_2\cdot3^2+a_1\cdot3^1+a_0\cdot3^0,\] where $a_i\in \{-1,0,1\}$ for $0\le i \le 7$
Note that the least nonnegative integer that can be represented is $0$ , when all $a_i=0$ . The highest number will be the number when all $a_i=1$ . That will be \[3^7+3^6+3^5+3^4+3^3+3^2+3^1+3^0=\frac{3^8-1}{3-1}\] \[=3280\]
Therefore, there are $3280$ positive integers and $(3280+1)$ nonnegative integers (while including $0$ ) that can be represented. Our answer is $\boxed{3281}$

Answer: D 3281
Problem: How many nonnegative integers can be written in the form \[a_7\cdot3^7+a_6\cdot3^6+a_5\cdot3^5+a_4\cdot3^4+a_3\cdot3^3+a_2\cdot3^2+a_1\cdot3^1+a_0\cdot3^0,\] where $a_i\in \{-1,0,1\}$ for $0\le i \le 7$
$\textbf{(A) } 512 \qquad  \textbf{(B) } 729 \qquad  \textbf{(C) } 1094 \qquad  \textbf{(D) } 3281 \qquad  \textbf{(E) } 59,048$

Solution: Notice that there are $3^8$ options for $a_7, a_6, \cdots a_0$ since each $a_i$ can take on the value $-1$ $0$ , or $1$ . Now we want to find how many of them are positive and then we can add one in the end to account for $0$ (they are asking for non-negative).
By symmetry (look out for these on the contest), we see that exactly half of them are positive. So $\lfloor{\tfrac{3^8}{2}}\rfloor = 3280.$ Now we will add $1$ because of the $0$ to account for the non-negative solutions.
So our final answer is $3280 + 1 = 3281$ which is $\boxed{3281}$

Answer: D 3281
Problem: How many nonnegative integers can be written in the form \[a_7\cdot3^7+a_6\cdot3^6+a_5\cdot3^5+a_4\cdot3^4+a_3\cdot3^3+a_2\cdot3^2+a_1\cdot3^1+a_0\cdot3^0,\] where $a_i\in \{-1,0,1\}$ for $0\le i \le 7$
$\textbf{(A) } 512 \qquad  \textbf{(B) } 729 \qquad  \textbf{(C) } 1094 \qquad  \textbf{(D) } 3281 \qquad  \textbf{(E) } 59,048$

Solution: Obviously, there are $3^8 = 6561$ possible, and one of them is 0, so other $6560$ are either positive or negative. By the symmetry, we can get the answer is $6560/2 + 1$ which is $\boxed{3281}$

Answer: D 3281
Problem: How many nonnegative integers can be written in the form \[a_7\cdot3^7+a_6\cdot3^6+a_5\cdot3^5+a_4\cdot3^4+a_3\cdot3^3+a_2\cdot3^2+a_1\cdot3^1+a_0\cdot3^0,\] where $a_i\in \{-1,0,1\}$ for $0\le i \le 7$
$\textbf{(A) } 512 \qquad  \textbf{(B) } 729 \qquad  \textbf{(C) } 1094 \qquad  \textbf{(D) } 3281 \qquad  \textbf{(E) } 59,048$

Solution: The solution has to obviously be smaller than $3^{7-0+1}=3^8$ but larger than $3^{(7-0+1)-1} = 3^7.$ The only remaining answer is $\boxed{3281}.$ ~mathboy282

Answer: D 3281
Problem: A scanning code consists of a $7 \times 7$ grid of squares, with some of its squares colored black and the rest colored white. There must be at least one square of each color in this grid of $49$ squares. A scanning code is called $\textit{symmetric}$ if its look does not change when the entire square is rotated by a multiple of $90 ^{\circ}$ counterclockwise around its center, nor when it is reflected across a line joining opposite corners or a line joining midpoints of opposite sides. What is the total number of possible symmetric scanning codes?
$\textbf{(A)} \text{ 510} \qquad \textbf{(B)} \text{ 1022} \qquad \textbf{(C)} \text{ 8190} \qquad \textbf{(D)} \text{ 8192} \qquad \textbf{(E)} \text{ 65,534}$

Solution: [asy] size(100pt); draw((1,0)--(8,0),linewidth(0.5)); draw((1,2)--(6,2),linewidth(0.5)); draw((1,4)--(4,4),linewidth(0.5)); draw((1,6)--(2,6),linewidth(0.5)); draw((2,6)--(2,0),linewidth(0.5)); draw((4,4)--(4,0),linewidth(0.5)); draw((6,2)--(6,0),linewidth(0.5)); draw((1,0)--(1,7),dashed+linewidth(0.5)); draw((1,7)--(8,0),dashed+linewidth(0.5)); [/asy]
Imagine folding the scanning code along its lines of symmetry. There will be $10$ regions which you have control over coloring. Since we must subtract off $2$ cases for the all-black and all-white cases, the answer is $2^{10}-2=\boxed{1022.}$

Answer: B 1022.