To determine who came ahead in the shooting contest between you and LeBron, we need to calculate the total amount of money won by each player based on the betting structure.
The betting amounts for each shot are as follows:
- Shot 1: \( \$1 \)
- Shot 2: \( \$2 \)
- Shot 3: \( \$4 \)
- Shot 4: \( \$8 \)
- Shot 5: \( \$16 \)
- Shot 6: \( \$32 \)
- Shot 7: \( \$64 \)
- Shot 8: \( \$128 \)
- Shot 9: \( \$256 \)
- Shot 10: \( \$512 \)
- Shot 11: \( \$1024 \)
- Shot 12: \( \$2048 \)
- Shot 13: \( \$4096 \)
- Shot 14: \( \$8192 \)
- Shot 15: \( \$16384 \)
- Shot 16: \( \$32768 \)
- Shot 17: \( \$65536 \)
- Shot 18: \( \$131072 \)
Now, let's calculate the total amount of money won by each player:
1. **LeBron's winnings**: He won the first 17 shots, so he wins the amounts for those shots:
\[
\text{Total won by LeBron} = 1 + 2 + 4 + 8 + 16 + 32 + 64 + 128 + 256 + 512 + 1024 + 2048 + 4096 + 8192 + 16384 + 32768 + 65536
\]
This is a geometric series where the first term \( a = 1 \) and the common ratio \( r = 2 \). The sum of the first \( n \) terms of a geometric series can be calculated using the formula:
\[
S_n = a \frac{r^n - 1}{r - 1}
\]
For \( n = 17 \):
\[
S_{17} = 1 \cdot \frac{2^{17} - 1}{2 - 1} = 2^{17} - 1 = 131072 - 1 = 131071
\]
2. **Your winnings**: You won the last shot (the 18th shot), which is worth \( \$131072 \).
Now, let's calculate the net result:
- **LeBron's total winnings**: \( \$131071 \)
- **Your total winnings**: \( \$131072 \)
To find out who came ahead, we subtract LeBron's total from your total:
\[
\text{Net result} = \text{Your winnings} - \text{LeBron's winnings} = 131072 - 131071 = 1
\]
Thus, you came ahead by \( \$1 \).
You won the contest by \( \$1 \).