Problem: A bee starts flying from point $P_0$ . She flies $1$ inch due east to point $P_1$ . For $j \ge 1$ , once the bee reaches point $P_j$ , she turns $30^{\circ}$ counterclockwise and then flies $j+1$ inches straight to point $P_{j+1}$ . When the bee reaches $P_{2015}$ she is exactly $a \sqrt{b} + c \sqrt{d}$ inches away from $P_0$ , where $a$ $b$ $c$ and $d$ are positive integers and $b$ and $d$ are not divisible by the square of any prime. What is $a+b+c+d$
$\textbf{(A)}\; 2016 \qquad\textbf{(B)}\; 2024 \qquad\textbf{(C)}\; 2032 \qquad\textbf{(D)}\; 2040 \qquad\textbf{(E)}\; 2048$

Solution: We first notice that if the bee is turning 30 degrees each turn, it will take 12 turns to be looking in the same direction when the bee initially left. This means we simply need to answer the question; how far will the bee be when the bee is facing in the same direction?
First we use the fact that after 3 turns, the bee will be facing in a direction perpendicular to the the initial direction. From here we can draw a perpendicular from $P_2$ to the line $\overline{P_0P_1}$ intersecting a point $C_0$ . We will also place the point $C_1$ at the intersection of $\overline{P_0P_1}$ and $\overline{P_3P_4}$ . In addition, the point $C_2$ is placed at the perpendicular dropped from $P_2$ to the line $\overline{P_3C_1}$ . We will also set the distance $\overline{P_0P_1} = n$ and thus $\overline{P_1P_2} = n+1$ . With this perpendicular we see that the triangle $\triangle{P_1P_2C_0}$ is a 30-60-90 triangle. This means that the length $\overline{P_1C_0} = \frac{(n+1)\sqrt{3}}{2}$ and the length $\overline{C_1C_2} = \frac{n+1}{2}$ . We can also see that the triangle $\triangle{P_2C_1P_3}$ is a 30-60-90 triangle and thus $\overline{C_0C_1} = \frac{n+2}{2}$ and $\overline{C_2P_3} = \frac{(n+2)\sqrt{3}}{2}$ . Now if we continue this across all $P_i$ and set the point $P_0$ to the coordinates $(0, 0)$ . As you can see, we are inherently putting a “box” around the figure. Doing similar calculations for all four “sides” of this spiral we get that the length
\[\overline{P_0C_1} = n + \frac{(n+1)\sqrt{3}}{2} + \frac{n+2}{2}\] \[\overline{C_1C_4} = \frac{(n+1)}{2} + \frac{(n+2)\sqrt{3}}{2} + (n+3) + \frac{(n+4)\sqrt{3}}{2} + \frac{n+5}{2}\] \[\overline{C_4C_7} = \frac{(n+4)}{2} + \frac{(n+5)\sqrt{3}}{2} + (n+6) + \frac{(n+7)\sqrt{3}}{2} + \frac{n+8}{2}\] \[\overline{C_7C_{10}} = \frac{(n+7)}{2} + \frac{(n+8)\sqrt{3}}{2} + (n+9) + \frac{(n+10)\sqrt{3}}{2} + \frac{n+11}{2}\] , and finally \[\overline{C_{10}P_{12}} = \frac{(n+10)}{2} + \frac{(n+11)\sqrt{3}}{2}\]
Here the point $C_4$ is defined as the intersection of lines $\overline{P_3P_4}$ and $\overline{P_6P_7}$ . The point $C_7$ is defined as the intersection of lines $\overline{P_6P_7}$ and $\overline{P_9P_{10}}$ . Finally, the point $C_10$ is defined as the intersection of lines $\overline{P_{9}P_{10}}$ and $\overline{P_{12}P_{13}}$ . Note that our spiral stops at $P_{12}$ before the next spiral starts. Calculating the offset from the x and the y direction, we see that the offset, or the new point $P_{12}$ , is $({-6}, {-6}-12 \sqrt{3})$ . This is an interesting property that the points’ coordinate changes by a constant offset no matter what $n$ is. Since the new point’s subscript changes by 12 each time and we see that 2016 is divisible by 12, the point $P_{2016} = ({-168} \cdot {6}, {168} \cdot ({-6} \sqrt{3} {-12}))$ . Using similar 30-60-90 triangle properties, we see that $P_{2015} = ({-6} \cdot 168-1008 \sqrt{3}, 168({-6} \sqrt{3} - 12) + 1008)$ . Using the distance formula, the numbers cancel out nicely (1008 is divisible by 168, so take 168 when using the distance formula) and we see that the final answer is $(1008)(1+\sqrt{3})(\sqrt{2})$ which gives us a final answer of $\boxed{2024}$

Answer:  2024